此代码成功执行,然后打开“条款和条件页面”。但是我面对的一个问题是页面顶部显示了一个额外的导航栏。如何隐藏或删除页面顶部的导航栏?
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];
}
最佳答案
您阅读过文档吗? UINavigationController Class Reference
[navigationController setNavigationBarHidden:YES];
关于iphone - 如何隐藏或删除顶部的导航栏?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17706268/