UIAlertController 的按钮在单击时更改其颜色。怎么解决? - Swift
Button of UIAlertController changes its color on click. How to solve? - Swift
我有一个带有 tintColor
橙色的 UIAlertController,但每次我单击 Button 时它都会将其颜色更改为蓝色(我猜是本机颜色)。我该如何解决?
let orange: UIColor = UIColor(red: 232.0/255, green: 121.0/255, blue: 23.0/255, alpha: 1.0)
let alert = UIAlertController(title: "Welcome!", message: "", preferredStyle: UIAlertControllerStyle.Alert)
alert.view.tintColor = orange
alert.addAction(UIAlertAction(title: "Done", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)
这是 iOS 9.0
中的 Bug
,请参阅 apple Community bug reports,可能已修复 iOS 9.1
有关其他参考,请参阅此 link
我有一个带有 tintColor
橙色的 UIAlertController,但每次我单击 Button 时它都会将其颜色更改为蓝色(我猜是本机颜色)。我该如何解决?
let orange: UIColor = UIColor(red: 232.0/255, green: 121.0/255, blue: 23.0/255, alpha: 1.0)
let alert = UIAlertController(title: "Welcome!", message: "", preferredStyle: UIAlertControllerStyle.Alert)
alert.view.tintColor = orange
alert.addAction(UIAlertAction(title: "Done", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)
这是 iOS 9.0
中的 Bug
,请参阅 apple Community bug reports,可能已修复 iOS 9.1
有关其他参考,请参阅此 link