如何更改UIAlertController的颜色?
我可以改变颜色UIAlertController吗?标准颜色是蓝色。而且它与标准iOS应用程序非常接近。是否可定制?我该如何改变颜色?例如按钮颜色。
谢谢!
回答:
您可以只更改tintColor基础视图的,但是由于iOS
9(https://openradar.appspot.com/22209332)中引入的一个已知错误,因此tintColor被应用程序窗口的覆盖tintColor。
您可以:
tintColor在AppDelegate中更改应用程序。func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {self.window.tintColor = UIColor.redColor()
return true
}
在完成块中重新应用颜色。
self.presentViewController(alert, animated: true, completion: {() -> Void inalert.view.tintColor = UIColor.redColor()
})
以上是 如何更改UIAlertController的颜色? 的全部内容, 来源链接: utcz.com/qa/414908.html

