How do I add storyboard-based Header and CustomTableCell to a “Search Bar and Search Display Controller”

后端 未结 1 1622
北海茫月
北海茫月 2021-01-29 00:02

PRESENTATION

Mine is a simple project: It consists of a NavigationController, ViewController, and a “Search Bar and Search Display Controller”

M

相关标签:
1条回答
  • 2021-01-29 00:30

    If you want to make a stand-alone view (not in a view controller) in IB, then you should do it in a xib file, not a storyboard. You can have as many storyboard and xib files in an app as you want; they can be mixed freely. To make a new cell in a xib file, just go to New File --> User Interface --> Empty then drag in a UITableViewCell. Add any subviews you want, and in your table view controller (or whatever class is your table view data source), register the xib file with, registerNib:forIdentifier: (usually, you do this in viewDidLoad).

    0 讨论(0)
提交回复
热议问题