Open ChenYilong opened 5 years ago
Info.plist增加下列选项可以强制选择浅色或者深色模式
<key>UIUserInterfaceStyle</key>
<string>UIUserInterfaceStyleLight</string>
赞
dark mode 苹果要求开发者必须适配吗?没有看到相关官方文档
还没说必须
UIUserInterfaceStyle
更正一下,UIUserInterfaceStyle
的value必须是Light
或者Dark
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW44
否则包传不上去,但实际测试写UIUserInterfaceStyleLight
是可以进入强制浅色模式的,也就是说iOS13的代码是支持,但是审核那里还没支持
哈?没听懂,详细讲讲?
哈?没听懂,详细讲讲?
Info.plist里的key UIUserInterfaceStyle的值必须是Light或者Dark
有人了解过Flutter的Dark mode适配吗
iTeaTime(技术清谈)@BM-成都iOS:
Q:这个属性还提交不上去?
我也遇见这个问题了, 提交不上去
我们删掉了这个属性,就可以提交上去了,但是上个月还是没有关系的
目前我们的解决方案也是删掉这个属性, 前两天试过一回是可以的, 不知道为什么今天又不行了
xcode10 不支持这个设置 xcode11 才支持
胡说八道,谁说苹果强制支持dark模式了,人家只是建议,毕竟很多App根本没有必要dark模式,比如游戏。
Action
WWDC19:
其中注意:
审核强制要求适配黑夜模式,近在咫尺。
Other
正文
所以到底如何实现“五彩斑斓的黑”?
WWDC19上,提了案例,可以可以自己手动切换模式。比如给儿童做的app,可以只支持 Dark Mode ,plist设置后,对应页面、控件取到都是 Dark Mode 对应的值。
举例说明:
可以使用
overrideUserInterfaceStyle
属性控制ViewController的显示模式:既然给了plist可以设置,就是说明开发者有控制权。