IOS代码创建uinavigationcontroller

来源:互联网 发布:催情药在淘宝叫什么 编辑:程序博客网 时间:2024/05/20 08:22

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOption

中添加代码

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];    [self.window setBackgroundColor:[UIColor whiteColor]];    myViewController *baseView = [[myViewController alloc]init];    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:baseView];        self.window.rootViewController = nav;    [self.window makeKeyAndVisible];


0 0
原创粉丝点击