
UIWindow继承于UIView,可以说是一个特殊的UIView,可以通过UIView来实现。

UIWindow 是被系统控制的,应该是被系统调用的,一个ios应用只有一个keyWindow,(上面的截图应该是一个UiWindow),弹层上经常会使用一个UIWindow 的内容进行实现。
【首先创建一个Window,之后才在Window之上叠加多个view】
UIView 的使用方法:
一个UIView 可以包含有很多UIView,也就是自图层,并且UIView中包含有一个root-layer,这样就是我们能够通过这个内容来进行实现。(UiView概念列斯pS中的图层概念)


_alertWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
_alertWindow.windowLevel = level;
_alertWindow.rootViewController = self;
【设置有关的window弹层】


http://www.cnblogs.com/wendingding/p/3770052.html
UIView的内容链接
#if TARGET_IPHONE_SIMULATOR
let commonHost = "";
#else
let commonHost = "";
#endif
还有就是自定定义的编译指令
- (instancetype)init {
if (self = [super init]) {
_data = [HostManagerDataServer new];
#ifdef ENV_TEST
[self switchToTest];
#else
[self switchToRelease];
#endif
}
return self;
}
这个就是我们通过设置编译指令来实现是内部环境还是外部环境
在iOS上的真机调试不了
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.vanchu.apps.guimiquan</string>
</array>
</dict>
</plist>
应该是一个安全文件,影响真机调试




网友评论