-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;
4

2 回答 2

0

设置navigationBarHidden属性以隐藏导航栏。有关参考,请参阅UINavigationController文档。

将以下语句添加到您的didFinishLaunchingWithOptions方法中。

[self.navigationController setNavigationBarHidden:YES animated:YES];
于 2012-07-05T03:50:59.143 回答
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;
}
于 2012-07-05T03:52:55.793 回答