I have a collectionView inside a tableViewCell
for example: credit: How to use StoryBoard quick build a collectionView inside UITableViewCell
I would like to reload the collectionView when I update information.
I have put a print in the collectionView's cellForItemAtIndexPath to test if it is being called but it isn't. How can I get the collectionView to reload?
Create a new iOS app projectAdd a CollectionView by pressing command shift L to open the storyboard widget window. Drag the collectionView onto the main view controller. Add constraints to the UICollectionView widget to ensure that the widget fills the screen on all devices.
A collection view manages an ordered set of content, such as the grid of photos in the Photos app, and presents it visually. Collection views are a collaboration between many different objects, including: Cells. A cell provides the visual representation for each piece of your content.
I found out how! In my tableViewCell class I just need to link the collectionView as an outlet so in my tableViewCell's cellForRowAtIndexPath
I just needed to call cell.collectionView.reloadData()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With