2012-07-05 247 views
-4
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 
    // Override point for customization after application launch. 
    MasterViewController *masterViewController = [[[MasterViewController alloc] initWithNibName:@"MasterViewController" bundle:nil] autorelease]; 
    self.navigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease]; 
    self.window.rootViewController = self.navigationController; 
    [self.window makeKeyAndVisible]; 
    return YES; 
+0

你爲什麼要服用的導航欄,如果你想隱藏它? –

+0

也請將問題寫在標準格式中,以便可讀 –

回答

0

試試這個刪除導航欄。

(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 
    // Override point for customization after application launch. 
    MasterViewController *masterViewController = [[[MasterViewController alloc] initWithNibName:@"MasterViewController" bundle:nil] autorelease]; 
    self.window.rootViewController = masterViewController; 
    [self.window makeKeyAndVisible]; return YES; 
} 
+0

問題已解決,thx – Solebeam

0

設置navigationBarHidden屬性以隱藏導航條。有關參考,請參閱UINavigationController文檔。

將以下語句添加到您的didFinishLaunchingWithOptions方法中。

[self.navigationController setNavigationBarHidden:YES animated:YES]; 
+0

您的回答沒有解決問題,但回答謝謝 – Solebeam