获取rootViewController 的两种方式分别是:
UIViewController *root= [[UIApplication sharedApplication] keyWindow].rootViewController;
AppDelegate appdelegate=(AppDelegate)[UIApplication sharedApplication].delegate;
UIViewController *rooViewController= [appdelegate window].rootViewController;
当UIAlertView ,ActionSheet 代理方法之后调用1.root 对象UIApplicationRotationFollowingController,2. rooViewController依然是你设置的windows.rootViewController
网友评论