0

When we add any UITableView to UIViewController through storyboard we will see screen like this

enter image description here

and there is an option for PrototypeCell top right side. But when we add the UITableView to View.xib we will see screen like this

enter image description here

and here there is no PrototypeCell. I am not understanding this why there is difference. Please explain.

Varun Naharia
  • 5,318
  • 10
  • 50
  • 84

2 Answers2

0

It's different because when you drag and drop a UItbaleViewController in the UIStoryboard, it assume that you will use dynamic cells, and when you drag and dropped a simple UITableView it changed the property to static, which means that you will provide different UI and informations to each cells.

You can change the style to dynamic instead of plain if you want to have prototype cells.

Loegic
  • 3,390
  • 20
  • 33
0

PrototypeCell not available in xib file, storyboard only.

You can use separated xib for UITableViewCell in this case. (in storyboard case you also can use separated xib for cells)

AlexZd
  • 2,152
  • 2
  • 18
  • 29