本文转载至 http://stackoverflow.com/questions/26460706/uialertcontroller-custom-font-size-color
I am using new UIAlertController for showing alerts. I have this code:
Now I want to change title and message font, color, size and so. What's best way to do this? Edit: I should insert whole code. I created category for UIView that I could show right alert for iOS version.
|
||||
add a comment
|
Not sure if this is against private APIs/properties but using KVC works for me on ios8
|
|||
This works fine and help to fix you're problem:
Also consider this tutorial about customization of the Alerts. |
|||||||||||||||||||||
|
Use
And its usage:
Tested and working with style P.S. Better check for class availability instead of iOS version:
|
|||||
|
attributedTitle
for title andattributedMessage
for message. Not sure if it's best solution but for now it's good enough for me. – Libor Zapletal Oct 24 '14 at 9:18