iOS - 导航控制器

1、导航控制器

self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];

self.window.backgroundColor = [UIColor blackColor];

[self.window makeKeyAndVisible];

FirstViewController * vc = [[FirstViewController alloc] init];

//视图控制器的管理器

UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:vc];

self.window.rootViewController = nav;

//进入下一页

[self.navigationController pushViewController:thirdVC animated:YES];

//返回首页

[self.navigationController popToRootViewControllerAnimated:YES];

//返回上一页

[self.navigationController popViewControllerAnimated:YES];

 
上一篇:每日技术总结:fly.js,个位数前补零等


下一篇:require.js