Created
March 29, 2021 03:31
-
-
Save woodycatliu/ae09b572c8147ad223f72d02b2ff75c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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