简体   繁体   中英

How to hide or remove navigation Bar at the top?

This code is successful excuted then "terms and condition page" open. But 1 problem i face extra one navigation bar show on the top of the page. how to hide or remove that navigation bar at the top of the page ?

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

}

Have you read the documentation? UINavigationController Class Reference

[navigationController setNavigationBarHidden:YES];

In your storyboard select your navigation controller. On the right in the 4th tab uncheck show navigation bar.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM