禁用iOS13的暗黑模式

参考网址:
https://stackoverflow.com/questions/56537855/is-it-possible-to-opt-out-of-dark-mode-on-ios-13

参考苹果官方文档:
https://developer.apple.com/documentation/appkit/supporting_dark_mode_in_your_interface/choosing_a_specific_interface_style_for_your_ios_app?language=objc

According to Apple's "Implementing Dark Mode on iOS" Session (https://developer.apple.com/videos/play/wwdc2019/214/ starting at 31:13) it is possible to set overrideUserInterfaceStyle to UIUserInterfaceStyleLight or UIUserInterfaceStyleDark on any view controller or view, which will the be used in the traitCollection for any subview or view controller.

As already mentioned by SeanR, you can set UIUserInterfaceStyle to Light or Dark in you app's plist file to change this for your whole app.

即在info.plist中添加UIUserInterfaceStyle设置为light或者dark即可强制修改模式

你可能感兴趣的:(禁用iOS13的暗黑模式)