Navigation Controller crashing app - xcode

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!

Okay, turned out I had the setup correct but I required a project clean before it worked. I guess because I added the storyboard ID's after adding the segues.
Thank-you to the following answer: Answer

Related

storyboard viewcontroller to coded viewcontroller

Is it possible to connect Storyboard ViewControllers with manual code-written ViewControllers? What I'm trying to do is make an app that, when internet connection is established, I see the viewcontroller made in the storyboard with tools given in the xcode (like the stepper, progress view, and etc) and when there's no internet connection, I want to access my coded viewcontroller that doesn't use the provided storyboard. How do I make the transition from the viewcontroller in the storyboard to the one not in the storyboard? Thanks!
UPDATE:Image depiction of what I seek to find:
depiction
I believe what you wanna do is show a storyboard programmatically?
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "ViewController")
window?.rootViewController = vc
Don't forget to add the "ViewController" identifier to the ViewController in your Interface builder.

storyboard navigation controller without tableview controller

Whenever I add a Navigation controller to the xcode storyboard there is a tableviewcontroller added with a "relation" connecting the two and I don't want a tableviewcontroller, I want a regular viewcontroller. How do I get that? I am trying to reproduce the following Apple PhotoPicker sample in a storyboard.
Easy:
Drag a ViewController onto the storyboard, then click "editor" and "embed in". Choose NavigationController.
Done.

Using XCode storyboard to instantiate view controller that uses XIB for its design

I have a UIViewController subclass that I created previously that had its controls laid out in a XIB file.
I'd like to use this view controller in a storyboard now, but it seems although I can indicate a view controller's classname in the storyboard, I can't tell it to load the XIB.
I'd rather not move everything from the XIB to the storyboard but keep it in its separate XIB.
How can I get this UIViewController in the storyboard to load my XIB?
Delete the View contained by the view controller in the storyboard.
Then provide the view by configuring a nib file with the same name
as the view controller class. For example if the view controller
class is called MyViewController, name your xib file
MyViewController.xib.
EDIT Note that Swift seed 5 started breaking this technique, because it mangles the name of the .xib file it's looking for. See my answer here for workarounds: https://stackoverflow.com/a/25539016/341994 Basically this name matching was broken in iOS 8, but then Apple repented and fixed it so that it works again in iOS 9.

xcode 4.2 storyboard, segue by code

I'm trying to make the segue between a button created by coding and a view created in storyboard?
(the button is not in the storyboard, it's made inside the viewcontroller .m class)
please help if you know the solution
thanks,
If the current view controller (the one that owns the button) came from the storyboard, you can just use the performSegueWithIdentifier:sender: method of UIViewController, like this:
[self performSegueWithIdentifier:#"mySegue" sender:sender];

Splitviewcontroller xib after viewcontroller in xcode

i want to put splitviewcontroller xib after the viewcontroller xib in ipad version.i tried to search but it only shows to set splitviewcontroller xib from MainWindow..but i want to put normal view controller xib in starting and after that splitviewcontroller xib should be call.
any help will be appreciated
thank you.
i think u want present modal view controller for that.
as a new bee take a look at this to
http://mobileorchard.com/new-in-iphone-30-tutorial-series-part-2-in-app-email-messageui/
u have to customize them as u needed

Resources