How do I add a Navigation Bar to a UITableViewController in Interface Builder?

前端 未结 8 1159
陌清茗
陌清茗 2020-12-23 13:46

Interface builder does not let me click and drag a Navigation Bar onto a Table View Controller!!! It is super frustrating.

All I want is a table view with an edit bu

相关标签:
8条回答
  • 2020-12-23 14:31

    First add a navigation controller and put the table view controller (as root view controller) onto the navigation controller. This is how it is done in Code because I don't use IB.

    0 讨论(0)
  • 2020-12-23 14:40

    From iOS6 onwards, you can use container view. So what you have to do is take View controller, add the navigation bar to it, then add a Container View to same view controller. It will automatically, add the new view controller link to your container view. Now simply delete that, and your table view controller in the story board. Now embed the table view controller to container view by control drag. Hope it helps.

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