2012-07-05 186 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