Wednesday 18 July 2012

Create Navigation Controller Using View Based Application

AppDelegate Navigation Coding:

UIViewController *rootController = [[ViewController alloc]initWithNibName:@"ViewController_iPhone" bundle:nil];
UIViewController *rootController1 = [[ViewController alloc]initWithNibName:@"ViewController_iPad" bundle:nil];

UINavigationController *navigationController = [[UINavigationController alloc]
                        initWithRootViewController:rootController];
// navigationController = [[UINavigationController alloc]initWithRootViewController:rootController1];

self.window = [[UIWindow alloc] 
               initWithFrame:[[UIScreen mainScreen] bounds]];
[self.window addSubview:navigationController.view];
[self.window makeKeyAndVisible];
return YES;

No comments: