Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a container view to UICollectionViewCell

I am trying to add a container view to a UICollectionViewCell in interface builder but Xcode issues an error error: Illegal Configuration: Container Views cannot be placed in elements that are repeated at runtime. Will making the UICollectionViewCell static would solve this? If so, how would you make the UICollectionViewCell static?

like image 454
MobileDev Avatar asked Jan 13 '15 18:01

MobileDev


1 Answers

What I guess you are trying to do, is placing a UIViewController into a dynamically generated UITableViewCell. If so, this isn't possible if the cell you are generating are dynamic. If you know a priori that the cells will always be in a fixed number, you can generate them by Interface builder setting the cells to static.

If instead you only want to add a container view to your cell in order to put other objects in it, you need to add a UIView object, not a UIViewController.

like image 200
Lolloz89 Avatar answered Sep 19 '22 23:09

Lolloz89