I never used UICollectionViewController s, and I thought they were somewhat similar to UITableViewController s, but, to my surprise, I cannot add user interface elements to my UICollectionViewCell in the same way as with custom UITableViewCell s.
In fact, I can add tags, buttons, etc. to the interface builder, but when I run the application, the cells appear empty.
I registered the cell class during the viewDidLoad method by calling (void)registerClass:(Class)cellClass forCellWithReuseIdentifier:(NSString *)identifier , and I verified that I was returning a valid instance of UICollectionViewCell in the (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath .
What am I doing wrong?
ios objective-c uicollectionview uicollectionviewcell
neutrino
source share