获取屏幕当前最上层 Controller
2016-10-21 本文已影响0人
周大湿
- (UIViewController *)appRootViewController {
UIViewController *appRootVC =[UIApplication sharedApplication].keyWindow.rootViewController;
UIViewController *topVC = appRootVC;
while (topVC.presentedViewController) {
topVC = topVC.presentedViewController;
}
return topVC;
}