storyboard navigation controller without tableview controller - xcode

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.

Related

Linking storyboard view controller to its own viewcontroller.swift in Xcode 7.2

In the new Xcode 7.2 (iOS9), how do I add a viewcontroller.swift file and link it to a manually added view controller in the storyboard?
(This seems to be different than previous versions of Xcode where one would manually add a Cocoa Touch file after dragging a new view controller object in thestoryboard.)
Thank you.
It has always been the same for me but here are the steps that I follow.
Right click the file explorer on the left
Click Source->Next->Subclass UIViewController
Drag UIViewController into Interface Builder
Click the yellow circle to focus on the UIViewController
Click the Identity Inspector
Set the Custom Class to the name in your Swift File

NAvigation bar doesn't appear

I'm developing a storyboard app with UITabBarController.
I want a UINavigationBar on one of the tab ViewControllers. I set the property Black NavigatonBar in ViewController property, and also drag navigationItem to this view.
NavigationBar is not visible in the viewVontroller when I run the app
It sounds like you're changing the pop up in the simulated metrics inspector. That inspector allows you to tell Xcode about things that will exist in your app that don't exist in the storyboard.
It sounds like you want to add a navigation controller into the storyboard to wrap one of the view controllers in your tab controller. You can do that in the editor menu by choosing the "Embed in" menu, and then choosing "Navigation Controller".
Choosing that item will insert a new navigation controller, make the selected view controller the root of the navigation controller, and re-route any segues that used to point at the selected to controller to point at the navigation controller instead.

XCode, Storyboard, View Controller items are not being displayed

When opening up a project today, there is some weird behavior in XCode. Things have disappeared in the storyboard view like the NavigationBar in viewController, the buttons associated with it, etc. I can see in the Scene list that they still exist. Is there any way to have these show up again?
You probably need to add a navigation controller to your storyboard and make your view controller the root. You cannot simply set the top bar in simulated metrics in storyboard to navigation bar.

How do I debug a segue from TableViewCell in Xcode?

I'm trying to implement a segue from one a table view controller to another using storyboard.
I created a push segue from the source tableview cell to my destination table view controller in storyboard, and gave it an identifier.
When I touch a cell in the source tableview, prepareForSegue is called, but the segue never occurs. However, if I change it to a modal segue it works.
Any ideas how I can debug this to find out why it is failing? There's nothing in the debug log...
That explains it. 'Push' is specific to navigation controllers. The following is taken from the Glossary section of the iOS documentation:
"push segue A segue whose transition effect pushes the new view controller onto a navigation stack of a navigation controller."

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];

Resources