0
我使用ios 9 swift 2,我想更改警報的按鈕色調顏色。這是正常工作的代碼:tlickcolor的警報將在klick後發生變化
let alertController = UIAlertController(title: „Title here", message: „Text here.", preferredStyle: .Alert)
let rateAction = UIAlertAction(title: "Button 1", style: .Default) { (action) in
print(„OK「)
}
let cancelAction = UIAlertAction(title: "Button 2", style: .Default) { (action) in
print(„Cancel")
}
alertController.addAction(rateAction)
alertController.addAction(cancelAction)
self.presentViewController(alertController, animated: true) {}
alertController.view.tintColor = UIColor(red: (122/255.0), green: (165/255.0), blue: (23/255.0), alpha: 1.0)
}
,但如果我認爲我的手指上的一個按鈕,就可以看到,該tintcolor更改默認:
任何想法如何我可以解決這個問題?