首页 > 系统 > iOS > 正文

ios 切换根视图

2019-11-07 23:51:23
字体:
来源:转载
供稿:网友
UIViewController *listVC=[[UIStoryboard storyboardWithName:MAIN bundle:nil]instantiateViewControllerWithIdentifier:@"list"]; [self PResentViewController:listVC animated:YES completion:^{ UINavigationController *nav=[[UINavigationController alloc]initWithRootViewController:listVC]; nav.navigationBarHidden=YES; NSArray *arr = [UIapplication sharedApplication].windows; UIWindow *window = arr[0]; window.rootViewController = nav; [window makeKeyAndVisible]; }];
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表