5

Changing the font for the message and title of a UIAlertViewController object has already been answered here: How to change font size and color of UIAlertAction in UIAlertController.

But I want to know how to change the font on the title of UIAlertAction (iOS8+) using Swift. Unfortunately, a UIAlertAction instance does not have an attribute called "attributedTitle" just like an UIAlertController.

The code I want to extend to change the font is below:

let alertAction = UIAlertAction(title: "Got It!", style: .Default, handler: nil)
alertController.addAction(alertAction)

Any ideas would be greatly appreciated.

Sam Adams
  • 51
  • 2
  • Seems related to this question: http://stackoverflow.com/questions/26357066/is-it-possible-to-customize-the-font-and-appearance-of-a-uialertcontroller-in-th – peacetype Nov 04 '15 at 20:49

0 Answers0