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

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

    These steps worked for me in iOS 9:

    1. Add a View Controller to the Storyboard. Make UITableViewController as base Class.
    2. Add a Navigation Bar object onto view controller at the top.
    3. Add a Table View below Navigation bar.
    4. Add a Table View Cell into Table View.
    5. Add constraints.

提交回复
热议问题