I noticed that when I delete an app from my iPhone home screen, the alert view that appears shows a Delete button on the left and Cancel on the right. However, when I build a delete function within my app using UIAlertView, the buttons only seem to display with Cancel on the left and Delete on the right.
I'd like my app to be consistent with the OS, but I can't figure out how to make the Cancel button appear first. Does anyone know?
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Delete Song"
message:@"Are you sure you want to delete this song? This will permanently remove it from your database."
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Delete", nil];
I tried setting alert.cancelButtonIndex = 1, but that had no effect.