Sportica   Sportica

UINavigationController

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

 

posted @ 2013-06-24 17:26  qingjoin  阅读(225)  评论(0编辑  收藏  举报
  Sportica