I am interested in making a left-aligned UIAlertView with several lines like a bulletin list that would look like the following:
- line 1
- line 2
- line 3
Here’s what I have so far:
alert = [[UIAlertView alloc] initWithTitle: @"How to use buttons"
message: @"line 1. line 2, line 3 "
delegate: nil
cancelButtonTitle: @"OK"
otherButtonTitles: nil];
I also want to change the color of the alert view to red.
Bullets are represented by the unicode code 0x2022. I got it to work like this using “\n” for new lines:
That should work for the bullets.
For the left alignment, do this:
So in summary:
[NSString stringWithFormat:@"%C Line n", (unichar) 0x2022];for the bullets.UILabel. Then change the text alignment of the labels to left alignment usinglabel.textAlignment = NSTextAlignmentLeft.[alert show];.