2

このコードは正常に実行され、「利用規約ページ」が開きます。しかし、ページの上部に余分な 1 つのナビゲーション バーが表示されるという問題が 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 に答える