#pragma mark - 获取window根视图
- (UIViewController *)rootViewController{
if (!_rootViewController) {
_rootViewController = [UIApplication sharedApplication].keyWindow.rootViewController;
}
iOS:获取window根视图(rootViewController)和顶层UIViewController
最新推荐文章于 2024-06-30 17:23:45 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)