iOS 13适配问题

2019-09-25  本文已影响0人  NanNan

问题1 屏幕下移

点击查看此文章
更新Xcode11以后,在iOS13系统中遇到如下问题

借用网上图片.gif

注意出现这种情况的原因:
UIViewController中的属性modalPresentationStyle(该属性是控制器在模态视图中的样式)

ViewController *vc = [[ViewController alloc] init];
vc.title = @"presentVC";
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[self.window.rootViewController presentViewController:nav animated:YES completion:nil];

问题2 状态栏高度

ios13后弃用

[UIApplication sharedApplication].statusBarFrame.size.height;

改为

 [UIApplication sharedApplication].keyWindow.windowScene.statusBarManager.statusBarFrame.size.height;

问题3 网页加载

UIWebView在iOS13弃用了改用WKWebView

问题4 App的logo问题

如果替换过logo,在iOS13 上点击home键,切换到后台,之前被替换的图标会一闪而过。

问题5 暗黑模式

如果不想自己的应用开启暗黑模式,则需要在代码的info.plist文件中配置key值,User Interface Style为Light如图:


屏幕快照 2019-09-26 16.08.06.png
上一篇 下一篇

猜你喜欢

热点阅读