UIAlertController tint color defaults to blue on highlight

后端 未结 11 1115
傲寒
傲寒 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-01 11:27

    Update for Swift 4, Xcode 9

    private static func setupAppearanceForAlertController() {
        let view = UIView.appearance(whenContainedInInstancesOf: [UIAlertController.self])
        view.tintColor = .black
    }
    

提交回复
热议问题