iOS跳转方法(带demo)
主要有三种跳转方式:
1.改变根视图
self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen] .bounds];
one *jump1 = [[one alloc] init];
[UIApplication sharedApplication].keyWindow.rootViewController = jump1;
2.模态弹出
two *jump2 = [[two alloc] init];
[self presentViewController:jump2 animated:YES completion:nil];
3.用 UINavigationController跳转
three *jump3 = [[three alloc] init];
[self.navigationController pushViewController:jump3 animated:YES];
demo:
下载地址:
链接:https://pan.baidu.com/s/1GdFEEEg0DB-qyP9_vkG4xA 密码:rjfq