Reputation: 3555
I have an UICollection with only one section.
My issue is that my datasource method :
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
is never called when I init the UICollection. And I return a valid number (3) into the following datasource method !
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
After checking with breakpoints, my number of items in section 0 is returned, but still the numberOfItemsInSection
method isn't called.
Any Idea ?
I precise that I've already make 6 UICollection in my app with exactly the same frame but not the same data; I don't know why, this doesn't work this time.
Upvotes: 0
Views: 341
Reputation: 3555
Ok I'm an idiot. I forgot : [self.view addSubview: myCollectionView];
Thanks for help....
Upvotes: 2