I have a childViewController
on a UICollectionViewController
. I have so my childViewController appears on the screen. But when I register a cell collectionView?.register(MyCustomCell.self, forCellWithReuseIdentifier: CellId)
and use numberOfItemsInSection
and cellForItemAt
. The problem is that the cells wont appear, I have checked the code so it´s right. Can it be something with the childViewController?
Asked
Active
Viewed 26 times
0

Stc
- 25
- 7
1 Answers
1
Generally it's not preferred to add any child view or viewController to UICollectionViewController or UITableViewController as you will see un-expected results as both of them inherits from scrollview and make the added content scroll able or scattered any place, if you have then better create a custom viewController with a collectionView and the childViewController

Shehata Gamal
- 98,760
- 8
- 65
- 87