ChenYilong / ChenYilong/iOS13AdaptationTips
Dark Mode
- Dominant language
- No language data
- Stars
- 170
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
## Action
WWDC19:
> Apps on iOS 13 are expected to support dark mode
Use system colors and materials
Create your own dynamic colors and images Leverage flexible infrastructure
其中注意:
> Apps on iOS 13 are expected to support dark mode Use system colors and materials
审核强制要求适配黑夜模式,近在咫尺。
## Other



## 正文
所以到底如何实现“五彩斑斓的黑”?
WWDC19上,提了案例,可以可以自己手动切换模式。比如给儿童做的app,可以只支持 Dark Mode ,plist设置后,对应页面、控件取到都是 Dark Mode 对应的值。
举例说明:
可以使用 `overrideUserInterfaceStyle` 属性控制ViewController的显示模式:
```Swift
class AlwaysDarkViewController: UIViewController {
required init?(coder: NSCoder) {
super.init(coder: coder)
self.overrideUserInterfaceStyle = .dark
}
}
```
既然给了plist可以设置,就是说明开发者有控制权。
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.