UIAlertController的popover变形了

Adr*_*ian 6 uipopovercontroller ios ios8 uialertcontroller

我正在使用UIToolbar中的UIAlertController向用户提供一个选项列表,其中包含一个首选的操作表样式.呈现时,弹出箭头被切掉,其角落呈圆形,有两个不同的半径:

变形的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];
Run Code Online (Sandbox Code Playgroud)

这是一个已知的错误?我在iOS 8.2和iOS 8.1和8.2上的模拟器上尝试过物理iPad.

Ale*_*ria 0

尝试显式设置 allowedArrowDirections。

例如在 Swift 中:

actionSheet.popoverPresentationController?.permittedArrowDirections = UIPopoverArrowDirection.Down;
Run Code Online (Sandbox Code Playgroud)