在swift中设置UIAlertView按钮的颜色

时间:2015-06-09 16:38:14

标签: ios swift uialertview

我是一个新的快速程序员,我需要改变我的UIAlertView按钮颜色。例如,我想将其UIColor更改为黄色。你可以帮帮我吗?

1 个答案:

答案 0 :(得分:3)

您可以像这样更改alert.view.tintColor = UIColor.blackColor()

UIAlertView

但苹果不赞成定制UIAlertView

  

document.body.append(new Element.tag("mediator-form")); // Delaying the following after element is instantiated Timer.run((){ MediatorForm form = document.body.querySelector('mediator-form'); form.mediator = "Medication"; }); 类旨在按原样使用,不支持子类化。此类的视图层次结构是私有的,不得修改。

UIAlertView Class Reference

虽然有alternatives