iOS 电池栏颜色更改
iOS 电池栏颜色更改
获取外观
if (@available(iOS 13.0, *)) {
UIUserInterfaceStyle mode = UITraitCollection.currentTraitCollection.userInterfaceStyle;
if (mode == UIUserInterfaceStyleDark) {
NSLog(@"深色模式");
} else if (mode == UIUserInterfaceStyleLight) {
NSLog(@"浅色模式");
} else {
NSLog(@"未知模式");
}
}
电池栏更改颜色
info.plist
View controller-based status bar appearance
NO
Status bar style
黑底白字/白底黑字
Dark Content/Light Content
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!