Reputation: 848
Within my app I have a UIViewController and a UITableViewController.
I wish to navigate from the UIViewController to the UITableViewController.
Within the UITableViewController I want a navigation bar so that I can 'add' items and declare when I am 'done' so that I can travel back to my UIViewController.
To achieve this I have embedded the UITableViewController within a UINavigationController as this reveals the navigation bar which I can add my buttons to and add a title.
I have 'control dragged' a segue from the UIViewController to the UINavigationController, which itself is attached to the UITableViewController.
UIViewController -> UINavigationController -> UITableViewController
My intended functionality is to travel from the UIViewController to the UITableViewController. However, the app crashes with the following message:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard (<UIStoryboard: 0x7f96c1451890>) doesn't contain a view controller with identifier 'UINavigationController-IxO-nE-zon'
The app does not crash if my segue is directly attached from the UIViewController to the UITableViewController (with the UINavigationController gone). However, then I do not get my Navigation Bar at the top of the UITableViewController which I need.
So my question is either: can I fix this error so that I can travel between them, or is there another way of doing this so that I can travel between them whilst keeping my navigation bar.
Thank you!
Upvotes: 1
Views: 905