2012-06-07 87 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中的文件所有者。

相關問題