获取UIWindow

简介: 获取UIWindow
1,UIWindow *window = [UIApplication sharedApplication].keyWindow;   // 获得根窗口
2.- (UIView *)rootView {    UIView *rootView = self;  while (rootView.superview) {    if ([rootView.superview isKindOfClass:[UIWindow class]]) {      break;    }    rootView = rootView.superview;  }  return rootView;}
相关文章
UINavigationController和UITabBarController合用。
UINavigationController和UITabBarController合用。
53 0
|
Swift
Swift - UIView,UILabel,UIButton,UIImageView
Swift - UIView,UILabel,UIButton,UIImageView
67 0
UINavigationBar-使用总结
UINavigationBar-使用总结
83 0
|
前端开发
UIActivityIndicatorView使用
UIActivityIndicatorView显示一个标准的旋转进度轮,类似网页AJAX加载时的图标。     let loadIndicator = UIActivityIndicatorView(frame: CGRectMake(100, 100, 32, 32))     //指...
647 0