Collection-View-in-a-Table-View-Cell
Collection-View-in-a-Table-View-Cell copied to clipboard
TableViewCell.swift
Make sure to connect this collection view outlet to the cell’s collection view in the storyboard.
Can anyone elaborate on this? i am getting an error "the collectionView outlet from the TableViewConrtoller to the UICollectionView is invalid"
Yeah, I went to File -> New File and selected Swift file. Is that not working? Can you upload the project that's not working?
UITableViewController does not conform to UICollectionViewDataSource nor UICollectionViewDelegate protocol (or extension).
- create your own custom view controller.
- add extension (
UICollectionViewDataSourceandUICollectionViewDelegate) to it. - in storyboard, assign the TableViewController with your custom view controller.
- drag the
data sourceanddelegateoutlets from collection view to the view controller.