美文网首页
iOS 13 适配(都是快糙猛的方法,代价是牺牲了新特性)

iOS 13 适配(都是快糙猛的方法,代价是牺牲了新特性)

作者: 风___________ | 来源:发表于2019-10-17 18:41 被阅读0次

presentViewController 的controller 上面有个留白

原因: ios13 系统更改了controller的默认modalPresentationStyle
修复: [self presentViewController:nav animated:YES completion:nil]之前更改要弹出的视图的modalPresentationStyle
代码:nav.modalPresentationStyle = UIModalPresentationFullScreen;

暗色模式下颜色适配

AppDelegate 中设置:
    // 禁用暗色模式(强制使用浅色模式)
    if (@available(iOS 13.0, *)) {
        self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    }

未完待补。。。。

相关文章

网友评论

      本文标题:iOS 13 适配(都是快糙猛的方法,代价是牺牲了新特性)

      本文链接:https://www.haomeiwen.com/subject/vypvmctx.html