iphone - 如何隐藏或删除顶部的导航栏?

标签 iphone ios storyboard

此代码成功执行,然后打开“条款和条件页面”。但是 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];

}

最佳答案

你读过文档了吗? UINavigationController Class Reference

[navigationController setNavigationBarHidden:YES];

关于iphone - 如何隐藏或删除顶部的导航栏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17706268/

相关文章:

javascript - iPhone 日期字段 - 更改日期格式

iphone - 从文件异步加载图像

ios - iOS 中的自动 OTP 验证?

ios - "push"在 iOS 8.0 及更高版本中已弃用

iphone - 我希望我的 Storyboard的初始 View Controller 是当前 Controller

iphone - UITableview 的每个单元格中的不同图像

iphone - 我不知道如何在 iOS 6 中进行纵向和倒置

ios - 具有特定服务 uuid 的 ScanPeripherals

ios - 如何让音乐在所有 View 中继续播放

ios - Segue Storyboard条件问题