Skip to content

Instantly share code, notes, and snippets.

@woodycatliu
Created March 29, 2021 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woodycatliu/ae09b572c8147ad223f72d02b2ff75c3 to your computer and use it in GitHub Desktop.
Save woodycatliu/ae09b572c8147ad223f72d02b2ff75c3 to your computer and use it in GitHub Desktop.
/*
Change UIAlert message textColor
*/
extension UIAlertAction {
var titleTextColor: UIColor? {
get {
return self.value(forKey: "titleTextColor") as? UIColor
} set {
self.setValue(newValue, forKey: "titleTextColor")
}
}
}
// Use
let alert = UIAlertAction()
alert.titleTextColor = .red
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment