在弹出窗口在ios 9中被解雇之前,Actionsheet popover背景变成黑色

Noo*_*aju 13 objective-c ios9

使用以下:

  [self.actionSheetPostOptions showFromBarButtonItem:self.navigationItem.rightBarButtonItem animated:YES];
Run Code Online (Sandbox Code Playgroud)

也试过了

UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil
                                                                       message:nil
                                                                preferredStyle:UIAlertControllerStyleActionSheet];

UIAlertAction *actnCamera = [UIAlertAction actionWithTitle:@"Camera" style:UIAlertActionStyleDefault
                                                    handler:^(UIAlertAction * action) {
                                                 }];

UIAlertAction *actnLibrary = [UIAlertAction actionWithTitle:@"Library" style:UIAlertActionStyleDefault
                                                 handler:^(UIAlertAction * action) {
                                                 }];

[alertController addAction:actnLibrary];
[alertController addAction:actnCamera];
[alertController setModalPresentationStyle:UIModalPresentationPopover];
UIPopoverPresentationController *popPresenter = [alertController
                                                             popoverPresentationController];
popPresenter.barButtonItem = self.navigationItem.rightBarButtonItem;
[self presentViewController:alertController animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)

但在解雇时仍然遇到同样的问题.

更新iOS 11:iOS 11中不再存在此问题.

Fre*_*orf 3

您也在真实设备上尝试过吗?我在 iOS 模拟器中运行时看到了相同的行为,但在设备上运行良好。