自定義view,AppDelegate等地方,控制器的跳轉方法
阿新 • • 發佈:2019-02-15
#pragma mark ---- 跳轉控制器的方法 ---
-(void)jumpViewController
{
MoreViewController *more = [[MoreViewController alloc]init];
UIApplication *app =[UIApplication sharedApplication];
AppDelegate *app2 = app.delegate;
UINavigationController *nav =[[UINavigationController alloc]initWithRootViewController:more];
app2.window.rootViewController = nav;
app2.window.rootViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl;
}
//跳轉控制器的方法2
-(void)jumpViewController2
{
UINavigationController *nav =[[UINavigationController alloc]initWithRootViewController:vc];
nav.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self.window.rootViewController presentViewController:nav animated:YES completion:nil];
}
//跳轉控制器的方法2
-(void)jumpViewController3
{
[[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:vc animated:YES completion:nil];
}
-(void)jumpViewController
{
MoreViewController *more = [[MoreViewController alloc]init];
UIApplication *app =[UIApplication sharedApplication];
AppDelegate *app2 = app.delegate;
UINavigationController *nav =[[UINavigationController alloc]initWithRootViewController:more];
app2.window.rootViewController = nav;
app2.window.rootViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl;
}
//跳轉控制器的方法2
-(void)jumpViewController2
{
UINavigationController *nav =[[UINavigationController alloc]initWithRootViewController:vc];
nav.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self.window.rootViewController presentViewController:nav animated:YES completion:nil];
}
//跳轉控制器的方法2
-(void)jumpViewController3
{
[[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:vc animated:YES completion:nil];
}