【发布时间】:2015-05-04 08:09:59
【问题描述】:
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];
警报显示:
iOS 8.1 iPod touch: [OK] [取消]
iOS 8.3 iPhone 6 Plus: [取消] [OK]
为什么按钮的位置与 iPod 和 iPhone 不同?
【问题讨论】:
-
所以你的问题是“为什么按钮的位置与 iPod 和 iPhone 不同”?
-
取消按钮通常放在 Mac 和 iOS 的左侧。它看起来像一个错误。
-
这是 Apple 在 iOS 8.3 中引入的行为更改。
标签: ios objective-c uialertcontroller uialertaction