2

此代码成功执行,然后“条款和条件页面”打开。但是 1 个问题我在页面顶部面临额外的一个导航栏显示。如何隐藏或删除页面顶部的导航栏?

ClsMainPageAppDelegate.m

#import "ClsMainPageAppDelegate.h"
#import "ClsTermsandConditionViewController.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
    ClsTermsandConditionViewController *ivc = [storyboard instantiateViewControllerWithIdentifier:@"termsandConditionControl"];
    UINavigationController *navigationController=[[UINavigationController alloc] initWithRootViewController:ivc];
    self.window.rootViewController=nil;
    self.window.rootViewController = navigationController;
    [self.window makeKeyAndVisible];

}
4

2 回答 2

6

你读过文档吗?UINavigationController Class Reference

[navigationController setNavigationBarHidden:YES];
于 2013-07-17T17:26:28.960 回答
4

在您的故事板中选择您的导航控制器。在第 4 个选项卡的右侧,取消选中显示导航栏。

于 2013-07-17T17:26:28.167 回答