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加: [取消] [OK]UIAlertController不一致位置
爲什麼按鈕的位置與iPod和iPhone不同?
所以你的問題是「爲什麼按鈕的位置不同於iPod和iPhone?」 –
取消按鈕通常放置在Mac的左側和iOS,它看起來像一個bug – kelin
是的,這很奇怪 –