Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

swift: add UITableView to .xib view

I can't add a dynamic UITableView to a .xib View. How can I solve this?

The content field, where you can select dynamic content cells, does not appear.

like image 865
Vincent Avatar asked Mar 19 '15 20:03

Vincent


1 Answers

Your tableView should have the content set to Dynamic Prototypes in the xib file.

TableView dynamic prototype

If your already have this, just give some more details about your problem.

Hope this helps though!

Update

It seems like you can't really change the content in a tableView that is defined in a xib file. I think the only option you have if to create xib files for your cells separately and then use them in your datasource methods.

I suppose the reason for this is that you need to register the custom cell classes for the various cell identifiers.

like image 68
Catalina T. Avatar answered Nov 16 '22 01:11

Catalina T.