Xcode11前
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(励志名言英语NSDictionary *)launchOptions { //Xcode11前生效 lf.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; lf.window.backgroundColor = [UIColor whiteColor]; UIViewController *vC = [[CustomViewController alloc] init]; lf.window.rootViewController = vC; //window核心化可见 [lf.window makeKeyAndVisible]; return YES;}
Xcode11后
- (形容声音很大的四字词语void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)ssion options:(UISceneConnectionOptions *)connectionOptions API_AVAILABLE(ios(13.0)) API_AVAILABLE(ios(13.0)) API_AVAILABLE(ios(13.0)){ //Xcode11后生效 //scene行参字段名表象特征结构为UIScene*但持有的实例值的实际特征结构为UIWindowScene* //强制类型转化 if (@avail海底世界资料able(iOS 13.0, *)) { UIWindowScene *windowScene = (UIWindowScene *)scene; lf.window = [[小说创作UIWindow alloc] initWithWindowScene:windowScene]; } el { lf.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; } lf.window.backgroundColor = [UIColor whiteC学英语零基础olor]; UIViewController *vC = [[CustomViewController alloc] init]; lf.window.rootViewController = vC; //window核心化可见 [lf.window makeKeyAndVisible];}
本文地址:https://blog.csdn.net/yanhaijunyan/article/details/111938211
本文发布于:2023-04-04 13:04:15,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/zuowen/14f29bd3e9d301b16234bd28521f5a49.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文word下载地址:Xcode11前后自定义窗口.doc
本文 PDF 下载地址:Xcode11前后自定义窗口.pdf
留言与评论(共有 0 条评论) |