Asi G Asi G - 1 year ago 112
iOS Question

Objective C - Navigation bar error + crash weird

I have a weird situation.

I'm trying to add a navigation bar to my project by selecting the view. Editor --> embed in --> Navigation Controller

Then I click on button with "push segue", and the app is crashing with the next error:

Push segues can only be used when the source controller is managed by
an instance of UINavigationController

The weird thing is that when I'm doing the same steps in a new project it's working perfect.

Answer Source

Try adding the UINavigationControllerfrom the interface builder. Delete the table view controller and connect the UINavigationController to your first view controller as the "root view controller". Check that the navigation controller "Is Initial View Controller" in the attributes inspector.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download