1

I want to define a custom table cell view and reuse it in many tableView, so I create a xib file containing my custom cell view, but the problem is I don't know how to load the xib file in storyboard

the table cell view:

enter image description here

and I want the view show in the black area in storyboard

enter image description here

NANNAV
  • 4,875
  • 4
  • 32
  • 50
remykits
  • 1,735
  • 4
  • 18
  • 20

1 Answers1

3

You can just build the view directly in the storyboard prototype cells : http://www.appcoda.com/ios-programming-customize-uitableview-storyboard/

And to use the same view in different tableviews present in different controllers, you can just copy and paste (cmd-C cmd-V) the view within the prototype cell, so you dont need the XIB's at all.

But using the assistant editor, you an drag or copy-paste the views from the XIB to the storyboard too (but thats not recommended)

Hope this helps

Dhruv Goel
  • 2,715
  • 1
  • 17
  • 17
  • but if I need to change a cell, I need to change many cell for different view controller – remykits Feb 04 '13 at 05:37
  • in that case, you should create a single xib, and load the view from the xib, programmatically in all the controllers. You'll have to avoid using the storyboard for the custom UITableCell view – Dhruv Goel Feb 04 '13 at 05:39