作者:kingwign009 | 来源:互联网 | 2023-05-16 21:10
我正在使用UIToolbar中的UIAlertController向用户提供一个选项列表,其中包含一个首选的操作表样式.呈现时,弹出箭头被切掉,其角落呈圆形,有两个不同的半径:
我用来呈现它的代码直接来自文档,据我所知:
UIAlertController *alertCOntroller=
[UIAlertController alertControllerWithTitle:@""
message:@""
preferredStyle:UIAlertControllerStyleActionSheet];
NSArray *actiOns= @[
[UIAlertAction actionWithTitle:@"Take a Photo"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) {}],
[UIAlertAction actionWithTitle:@"Choose from Album"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) {}],
[UIAlertAction actionWithTitle:@"Cancel"
style:UIAlertActionStyleCancel
handler:^(UIAlertAction *action) {}]
];
for (UIAlertAction *action in actions) {
[alertController addAction:action];
}
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
alertController.modalPresentatiOnStyle= UIModalPresentationPopover;
alertController.popoverPresentationController.barButtOnItem= myBarButtonItem;
}
[self presentViewController:alertController animated:YES completion:nil];
这是一个已知的错误?我在iOS 8.2和iOS 8.1和8.2上的模拟器上尝试过物理iPad.