Root view controller always set as tableViewController when Navigation Controller is set - objective-c

When I use storyboards and drag out a navigation controller from the object library in Interface Builder, the root view controller, which comes with the nav controller, is always a table view controller.
Most of the time, I would just like a simple view controller. Is there a way to drag out the navigation controller and have a simple view controller set as the default, instead of the table view controller I'm getting now?
Thanks in advance!

The navigation controller usually comes connected to another controller which is the root controller. You can always delete the segue and table view controller, drag out a View Controller and reconnect the segue with a control click using the rootViewController option.

Related

Is the navigation controller's root view controller the same as that of the window's when set?

Just a question I have that doesn't appear to have been directly answered here before.
I have a simple app using storyboard which has a navigation controller set as the initial view controller in the storyboard, and the first view controller set as the navigation controller's root view controller.
I've read that the window has exactly one root view controller. Is that, then, in this case the navigation controller itself, since it's the initial view controller, or does the window share the navigation controller's root view controller?
Thanks in advance for any help.
The window's rootViewController is the navigation controller.
The navigation controller's rootViewController is its first view controller.
Those are two different view controllers.
What's probably confusing is that the navigation controller is a (specialized) view controller.

Implement a navigation controller into a tabbar controller

Okay I have a well known problem. I want to implement a tableview controller into a navigation controller. And this navigation controller should be implemented in a tabbar controller.
I am using XCode 4.2 and I started a new project with a tabbar controller template
Now what I did was in the xib file from firstViewController deleted the view and added a navigation controller with a tableview controller in it.
I connected the files owner view to the tableview item. But when I build and run it only shows the table view and not the navigation controller.
Can anybody help?
Kind regards
There is the TabBarController Application. In this application you will see how to implement NavigationController and TableView together in the TabBarController application:
http://www.edumobile.org/iphone/iphone-programming-tutorials/tabbarcontroller-with-navigationcontroller-and-tableview-in-iphone/

How to intergrate the created view controller into the storyboard?

I have a view controller along with .xib created and also a story board. Now i want to have this viewcontroller's view to appear in the storyboard between the navigation bar and the tableview. I thought of dragging a new view controller and have that class point to the view controller i created. Is this solution correct?
Yes that is correct, drag a view controller from the object pallete, change the class name to your view controllers class name and party on. Hook up any segues in the story board you need to it.

How to know Present view of UINavigation controller iPhoneSDK

i have one navigation controller, by using that i am pushing my view
here my problem is how to know that which view is presently appearing on my navigation controller
can any one of you give me the answer
Probably you want to look at the topViewController property of your UINavigationController (or perhaps its visibleViewController if you are using modal views). The current view would then be referenced by the view property of the returned controller.

Objective C: TabBarController and TableViewController

i want a TabelView-Navigation and permanently a TabBar at the bottom .
I pushed the TabBarController. It contains a list of Controllers (ViewController, ... and the TableViewController)
But if i navigate down in the TableView the TabBar moves to the left outside the window (like the old Table).
How can i use the TabBarController without losing him?
The UITabBarController needs to be the root view controller. It sounds like you are pushing a UITabBarController onto the stack of a UINavigationController. What you want to do is make the UINavigationController one of the view controllers managed by the tab bar controller.
Do this.
Create the Tab Bar Controller and set it as your rootController.
//You will not have three tabs and you need three view controllers//
Set your First View controller as a Navigation View controller.
// You will now have the Navigation bar at the top//
Create a new file which is a subclass of the UITableViewController.
// set this as your delegate and datasource for your table view controller methods//
// pull a table view controller inside the Navigation View Controller as mentioned in (2) & you will have a tableview and navigation view in FirstViewController. Similarly work with the other two tabs
If you have any more doubts; please watch this tutorial on how to do all of these.
http://www.youtube.com/watch?v=LBnPfAtswgw