How to edit UIAlertAction
text size and color? I have taken a UIAlertController
acoording to it how to edit the size. This i smy Code
Here is a solution for changing the text color in Swift:
let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
action.setValue(UIColor.black, forKey: "titleTextColor")
Or you could use this extension:
extension UIAlertAction {
var titleTextColor: UIColor? {
get { return self.value(forKey: "titleTextColor") as? UIColor }
set { self.setValue(newValue, forKey: "titleTextColor") }
}
}