if (@available(iOS 13.0, *)) {
黑色:
alertVc.overrideUserInterfaceStyle = UIUserInterfaceStyleDark;
白色:
alertVc.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
} else {
// Fallback on earlier versions
}
一切看透,就是这么简单~
if (@available(iOS 13.0, *)) {
黑色:
alertVc.overrideUserInterfaceStyle = UIUserInterfaceStyleDark;
白色:
alertVc.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
} else {
// Fallback on earlier versions
}
一切看透,就是这么简单~
本文标题:UIAlertController支持换肤
本文链接:https://www.haomeiwen.com/subject/lbtardtx.html
网友评论