2012-06-07 90 views

回答

2

在你的应用程序代理,你可以把你的代码是这样的:

self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease]; 
    UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:self.viewController]; 
    [self.window addSubview:navigationController.view]; 
0

在界面添加UInavigation控制器对象file.and然后在didfinishlaunch

self.navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; 
    [self.navigationController setNavigationBarHidden:NO]; 
    //self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent; 
    //self.navigationController.navigationBar.translucent = YES; 



    // Override point for customization after app launch  
    [window addSubview:self.navigationController.view]; 
    [window makeKeyAndVisible]; 

返回的代码添加YES ;

并且不要忘记将代理连接到IB中的文件所有者。

相关问题