UIAlertController tint color defaults to blue on highlight

后端 未结 11 1067
傲寒
傲寒 2021-01-01 10:56

I\'m use the following code to present a UIAlertController action sheet with the item text as red. I\'ve used the tint property to set the color.

UIAlertCont         


        
11条回答
  •  轮回少年
    2021-01-01 11:02

    Set your tint color in traitCollectionDidChange in a subclass of UIAlertController.

    override func traitCollectionDidChange(previousTraitCollection: UITraitCollection?) {
        super.traitCollectionDidChange(previousTraitCollection)
        self.view.tintColor = UIColor.redColor()
    }
    

提交回复
热议问题