美文网首页
Whose view is not in the window

Whose view is not in the window

作者: 搬码小能手 | 来源:发表于2022-09-07 17:05 被阅读0次
UIViewController *topRootViewController = [UIApplication sharedApplication].keyWindow.rootViewController;
while (topRootViewController.presentedViewController)
 {
    topRootViewController = topRootViewController.presentedViewController;
 }
 
//[topRootViewController presentViewController:yourController animated:YES completion:nil];
//or
[topRootViewController myMethod];

相关文章

网友评论

      本文标题:Whose view is not in the window

      本文链接:https://www.haomeiwen.com/subject/npbgnrtx.html