11
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:@"hello" preferredStyle:UIAlertControllerStyleAlert];

UIAlertAction *ok     = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:hander]
UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleCancel handler:hander]

[alertController addAction:ok];
[alertController addAction:cancel]; 

The alert shows:
iOS 8.1 iPod touch: [OK] [cancel]
iOS 8.3 iPhone 6 Plus: [cancel] [OK]

Why are the position of the buttons different from an iPod and an iPhone?

Schemetrical
  • 5,246
  • 2
  • 22
  • 42
Ted
  • 19,425
  • 10
  • 78
  • 99

2 Answers2

2

As far as I know, this is a change that Apple actively introduced in the new version of iOS 8.3

iOS 8

enter image description here

iOS 7

enter image description here

Juan Reyes
  • 444
  • 5
  • 8
2

I submitted a radar about this a couple weeks ago, and Apple responded saying "This is the new design for cancel buttons in alerts. The consistent experience for developers in 8.3 is for all alerts to have a Cancel button on the left (when laying out horizontally) and the bottom (when laying out vertically). Apple's own apps may choose to show their buttons differently (when encouraging the user to pick a particular option, for example)."

It's a little frustrating, as the system alerts, like when deleting an app, conform to the old behaviour, but our own apps conform to the new design, creating an inconsistent design.

Colin Humber
  • 1,305
  • 1
  • 15
  • 20