TableViewCell Class
- (void)awakeFromNib {
//Registering CollectionViewCell
}
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
return 1;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return [productsData count];
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
CollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"collectionCell" forIndexPath:indexPath];
NSDictionary *cellData = [productsData objectAtIndex:[indexPath row]];
cell.imageView.image = [UIImage imageNamed:[cellData objectForKey:@"image"]];
return cell;
}
How to call delegate methods of collection view?