Collection-View-in-a-Table-View-Cell icon indicating copy to clipboard operation
Collection-View-in-a-Table-View-Cell copied to clipboard

TableViewCell.swift

Open chaz-clark opened this issue 7 years ago • 2 comments

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"

chaz-clark avatar Aug 17 '17 02:08 chaz-clark

Yeah, I went to File -> New File and selected Swift file. Is that not working? Can you upload the project that's not working?

ashfurrow avatar Aug 19 '17 14:08 ashfurrow

UITableViewController does not conform to UICollectionViewDataSource nor UICollectionViewDelegate protocol (or extension).

  1. create your own custom view controller.
  2. add extension (UICollectionViewDataSource and UICollectionViewDelegate) to it.
  3. in storyboard, assign the TableViewController with your custom view controller.
  4. drag the data source and delegate outlets from collection view to the view controller.

johncpang avatar Sep 06 '19 14:09 johncpang