UINavigationController for iPad

How to use NavigationController in iPad using Interface Builder for Xcode 3.2? Is this possible to do?

Answers


Yes it is possible to use Navigation Controller in iPad. You have to follow the same steps that you would follow in iPhone programming. Drag and drop a navigation controller from the Obj Lib into Your XIB file. Connect it to the appropriate IBOutlet. Set the Root View Controller. And show your navigation controller's view. See the following example.

I have dragged and dropped the Navigation Controller in my MainWindow.xib. I have connected it to an IBOutlet in my app delegate. I have created a RootViewController. in the xib, I have set the Class name of the view Controller of the Navigation Controller to RootViewController. (You can see this if you disclose the Navigation Controller in IB). And then in

 -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions(NSDictionary *)launchOptions {    
    [self.window addSubview:navController.view];

    [self.window makeKeyAndVisible];
    return YES;
}

Need Your Help


About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.