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

rustybeanstalk picture rustybeanstalk · Feb 21, 2011 · Viewed 69.9k times · Source

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 button (done in interface-builder). If this is not possible, then how do I add a navbar progammatically?

Thanks in advance.

Answer

Greeso picture Greeso · Sep 12, 2014

From the outline view, make sure your Table View Controller is selected.

Then go to the Editor menu, and click on the Embed In submenu, and choose Navigation Controller and voila. You have your navigation controller pointing to your tableview controller with a relationship built in.