0

I would like to change the second sentence to a different color.

UIAlertController * alert=[UIAlertController
    alertControllerWithTitle:@"Warning!!!" message:@"This is the first sentence.\r\n\n
This is the second sentence I want a different color.\r\n\n
This is the third sentence.)"
preferredStyle:UIAlertControllerStyleAlert];
rmaddy
  • 314,917
  • 42
  • 532
  • 579
LKirin
  • 61
  • 1
  • 6
  • 5
    `UIAlertController` does not support attributed text. Write or find a custom alert class that does. – rmaddy Apr 30 '18 at 22:54
  • 2
    I would also ask the question, what value does the color add to the second sentence? Granted, I'm not answering the direct question, but consider the possibility that the fact `UIAlertController` doesn't support attributed text is a clue that alerts aren't intended to be highly customized for aesthetic reasons. – Joe Apr 30 '18 at 23:10
  • Possible duplicate of [UIAlertController custom font, size, color](https://stackoverflow.com/questions/26460706/uialertcontroller-custom-font-size-color) – koen May 01 '18 at 01:38

0 Answers0