美文网首页
UIAlertController 自定义显示文字颜色

UIAlertController 自定义显示文字颜色

作者: 白色天空729 | 来源:发表于2018-05-21 23:05 被阅读3次
class ZDXAlertController: UIAlertController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    override func addAction(_ action: UIAlertAction) {
        super.addAction(action)
        //通过tintColor实现按钮颜色的修改。
        self.view.tintColor = COMMON_COLOR
        //也可以通过设置 action.setValue 来实现
        //action.setValue(UIColor.orange, forKey:"titleTextColor")
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
}


相关文章

网友评论

      本文标题:UIAlertController 自定义显示文字颜色

      本文链接:https://www.haomeiwen.com/subject/qtdcjftx.html