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

前端 未结 8 1191
陌清茗
陌清茗 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: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.

提交回复
热议问题