- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; // Override point for customization after application launch. self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease]; //self.window.rootViewController = self.viewController; [self.window addSubview:self.viewController.view]; UINavigationController * navigationController = [[UINavigationController alloc]initWithRootViewController:self.viewController]; [self.window addSubview:navigationController.view]; [self.window makeKeyAndVisible]; return YES; } - (IBAction)btnPress:(id)sender { ViewController *viewc = [[ViewController alloc]init]; [self.navigationController pushViewController:viewc animated:YES]; }