iOS 类方法继承NSObject模态弹出

继承于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];

你可能感兴趣的:(iOS 类方法继承NSObject模态弹出)