I’m using this code:
UIAlertView *alert = [[UIAlertView alloc] init];
[alert setTitle:@"Select Tutorial"];
[alert setMessage:@""];
[alert setDelegate:self];
[alert addButtonWithTitle:@"Basic"];
[alert addButtonWithTitle:@"Advanced"];
alert.tag = e_VTselecttutorial;
[alert show];
[alert release];
It produces a window with two buttons, and it all works the way I want except for a graphic problem. Neither button is preferred, and the Advanced button comes up highlighted. It’s like it thinks Basic is a Cancel button, and Advanced is an OK button. I’ve checked cancelButtonIndex, and it’s -1 as I expect.
I want both buttons to look the same, and I can’t figure out how to do this.
If you combine everything into one line you can do so much easier.
Have you looked at an Action Sheet for this? According to the Apple Human Interface Guidelines: