Reputation: 6365
I have project supported till iOS7, i run it in iOS8 device using Xcode 5.1. I found problem in order of cancel button in UIAlertView.
Code
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil
message:@"Title"
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Button1",@"Button2",@"Button3",nil];
[alert show];
Output
Upvotes: 2
Views: 2080
Reputation: 567
Seems like iOS 8 onward, order of button appearance is the order in which you write them. In iOS 8 UIAlertView and UIActionSheet are deprecated. Instead use UIAlertController. Following is the reference to it:
The order in which you add UIAction in UIAlertController is the order in which buttons appear in alert.
UPDATE: Ordering of buttons is fixed in iOS 8 Beta 3. Position of 'Cancel' button is always last now.
Upvotes: 3