美文网首页
iOS whose view is not in the win

iOS whose view is not in the win

作者: 渴望平静生活的上班族 | 来源:发表于2017-12-18 14:20 被阅读0次

原因:不是用当前栈顶的控制器调用present方法就会出现这个问题

用栈顶的控制器调用present就行了  或者获取当前window的根控制器

UIViewController*top=[UIApplicationsharedApplication].keyWindow.rootViewController;

[top presentViewController:secondView animated:YES completion:nil];

相关文章

网友评论

      本文标题:iOS whose view is not in the win

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