我有一個簡單的noob問題,我想隱藏UINavigationController的導航欄,但我很確定我沒有調用正確的對象。UINavigationController,只是隱藏導航欄
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
UIViewController *rootViewController = [[[TestViewController alloc] init] autorelease];
viewController = [ [UINavigationController alloc] initWithRootViewController:rootViewController];
[window addSubview:viewController.view];
[window addSubview: rootViewController.view];
[window makeKeyAndVisible];
return YES;
}
現在,I`ve試過了,這樣的:
-(void)hideBar {
viewController.navigationBarHidden = YES;
}
據抱怨說,「navigationBarHidden」沒有對象類型的UIViewController發現,很明顯,我將需要改爲調用UINavigation控制器,但是這在那裏我卡住了...
就是這樣,謝謝一堆! –