iOS 类方法继承NSObject模态弹出
2019-11-08 本文已影响0人
张天奇天张
继承于NSObject的类执行跳转到登录页面时无法触发控制器跳转
UIViewController *RootViewController = [UIApplication sharedApplication].keyWindow.rootViewController;
while (RootViewController.presentedViewController){
RootViewController = RootViewController.presentedViewController;
}
LoginHomeViewController *login = [[LoginHomeViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:login];
[RootViewController presentViewController:nav animated:YES completion:nil];