Ted*_*Ted 11 objective-c ios uialertcontroller uialertaction
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];
Run Code Online (Sandbox Code Playgroud)
警报显示:
iOS 8.1 iPod touch: [确定] [取消]
iOS 8.3 iPhone 6 Plus: [取消] [确定]
为什么按钮的位置与iPod和iPhone不同?
几周前我提交了一份关于此问题的雷达,苹果回应说“这是警报中取消按钮的新设计。8.3 中开发人员的一致体验是所有警报在左侧都有一个取消按钮(在布局时)水平)和底部(垂直布局时)。苹果自己的应用程序可能会选择以不同的方式显示按钮(例如,当鼓励用户选择特定选项时)。
这有点令人沮丧,因为系统会发出警报,就像删除应用程序时一样,符合旧的行为,但我们自己的应用程序符合新的设计,从而造成设计不一致。
| 归档时间: |
|
| 查看次数: |
2492 次 |
| 最近记录: |