页面的跳转有3种方式:
1.在window上创建2个UIView ,将原来的View从window上移除,将另一个View添加到window上
2.模态弹出或者模态消除:模态弹出一个视图控制器,弹出的新控制器view会覆盖本身的view
RegistVC *vc = [[RegistVC alloc]init];
[self presentViewController: vc animated :YES completion:nil];
//模态消失
[self dismissViewControllerAnimated:YES completion:nil];
3.创建根视图控制器 UINavigationController
MainVC *vc = [[MainVC alloc]init];
UINavigationController *nvc = [[UINavigationController alloc]initWithRootViewController:vc]
UIWindow *window = [[[UIApplication sharedApplication]delegate]window];
window.rootViewController = nvc;