How to create xib for a static cell and display it as a table in the interface builder?

In Xcode 8.x, I have a cell layout that I created in IB, which has its own xib. I would like to use the xib cell that I created in several difference scenarios, xib will be displayed in static cells in the UITableViewController. Is this feasible or do I need to recreate the static cells in each scene so that I want such a cell? There must be a way to do this, right?

An example of my xib (which has an accompanying .swift file): enter image description here

How can I get xib to display as a table in IB? I was able to create the cells programmatically and make them appear at run time in the table view, but it would REALLY be nice if I could select the cell in the table view and then set a custom class (or something else should be done so that IB displayed xib in place in a static cell.

For example, set a custom class for this: enter image description here

And you have a storyboard: enter image description here

+4
source share
1 answer

This is not possible at present, but would make a good improvement request for imo. You can send it to bugreport.apple.com.

0
source

Source: https://habr.com/ru/post/1675373/


All Articles