Home > Enterprise >  Error Related to Tables With Embedded Sections in NIB
Error Related to Tables With Embedded Sections in NIB

Time:11-27

I'm creating a series of NIBs to allow reuse of views that are used as panels in an app. I prototyped the first such by just using a view in the storyboard, and added outlets. One of the items in it was a table view.

When I copy the components from the original storyboard into a new NIB file, at runtime (and before any connections are made) I get the error,

Table views with embedded sections and cells are only supported in storyboard documents

I am not completely at a loss, and I think that this means that I have to create a custom NIB for the table cell in order to have a table view in a NIB. Can anyone confirm this? I'm assuming something along the lines of this: https://www.youtube.com/watch?v=epo_cxZy2Pc

Or I there a more profound abyss between me and my goal?

CodePudding user response:

I think that this means that I have to create a custom NIB for the table cell in order to have a table view in a NIB

That is correct. When you create a tableview in a nib file . You can not embed section or cell directly. You have to create a UITableviewcell and register in base nib file .

  • Related