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

 
原文地址:https://www.cnblogs.com/PSSSCode/p/5508421.html