I am facing this problem I can't decide who should be delegate of UICollectionView which is subview of UITableViewCell. UITableView has its controller as delegate. But who should be delegate of UICollectionView inside each UITableViewCell? :) And if it is supposed to be controller, how do I recognize correct model that I should use pass the data into UICollectionView since I don't have UITableViewCell instance or NSIndexPath instances available.
Asked
Active
Viewed 813 times
1
-
4Please, checkout this link. It will help you a lot. http://ashfurrow.com/blog/putting-a-uicollectionview-in-a-uitableviewcell It also links to a github repo https://github.com/AshFurrow/AFTabledCollectionView – The dude Oct 15 '14 at 09:09
-
so basically I need to subclass UICollectionView to pass correct data to it with its native datasource protocol? – Zdeněk Topič Oct 15 '14 at 10:38
-
That's it. It adds an index to the collection view and then uses it to access the correct data from the model. – The dude Oct 15 '14 at 11:21
-
ok, if thats legit solution, will keep this open anyway – Zdeněk Topič Oct 15 '14 at 12:29
-
Resolved Link for this : https://stackoverflow.com/a/45618501/3400991 – Shobhakar Tiwari Aug 10 '17 at 16:03
-
Possible duplicate of : https://stackoverflow.com/a/45618501/3400991 – Shobhakar Tiwari Aug 10 '17 at 16:04