私は持っていUITableview
ます。そのうちの 1 つは、UITableViewCell's
インスタンスUICollectionview
名が「amenityView」の です。UICollectionViewDelegate
と は、次のようUICollectionViewDataSource
に に設定さstoryboard
れます。次のメソッドが呼び出され、期待どおりにデータが入力されます。
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
- (UICollectionViewCell *)collectionView:(UICollectionView *)collection cellForItemAtIndexPath:(NSIndexPath *)indexPath
UICollectionViewCell
ただし、に含まれるを選択すると、以下のメソッドが呼び出されませんでしたUICollectionView
。私は何を逃したのですか?
-(void) collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
-(void) collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:(NSIndexPath *)indexPath
UPDATE: このメソッドで YES を返すcollectionView:shouldSelectItemAtIndexPath:
と、以下の 2 つのメソッドが呼び出されます。少なくともそれが私の側に欠けていたものです。これが誰かの体に役立つことを願っています...