UIAlertController custom font, size, color

后端 未结 25 1996
遥遥无期
遥遥无期 2020-11-22 09:06

I am using new UIAlertController for showing alerts. I have this code:

// nil titles break alert interface on iOS 8.0, so we\'ll be using empty strings
UIAle         


        
25条回答
  •  误落风尘
    2020-11-22 09:49

    You can use the following syntax without any private API.

    alert.view.tintColor = alert.view.tintColor = UIColor.green
    alert.setTitle(font: UIFont.boldSystemFont(ofSize: 26), color: UIColor.darkGray)
    alert.setMessage(font: UIFont.systemFont(ofSize: 26), color: UIColor.darkGray)
    

提交回复
热议问题