美文网首页
UIAlertView,ActionSheet 选择之后调用ro

UIAlertView,ActionSheet 选择之后调用ro

作者: 哈灰色 | 来源:发表于2018-01-10 17:57 被阅读0次

获取rootViewController 的两种方式分别是:

UIViewController *root=  [[UIApplication sharedApplication] keyWindow].rootViewController;

AppDelegate appdelegate=(AppDelegate)[UIApplication sharedApplication].delegate;
UIViewController *rooViewController= [appdelegate window].rootViewController;

image.png

当UIAlertView ,ActionSheet 代理方法之后调用1.root 对象UIApplicationRotationFollowingController,2. rooViewController依然是你设置的windows.rootViewController

相关文章

网友评论

      本文标题:UIAlertView,ActionSheet 选择之后调用ro

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