Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Actionsheet popover background truns to black before popover gets dismissed in ios 9

Using following:

  [self.actionSheetPostOptions showFromBarButtonItem:self.navigationItem.rightBarButtonItem animated:YES];

also tried

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];

but still getting same issue while dismissing.

Update iOS 11: This issue no longer exists in iOS 11.

like image 347
Nookaraju Avatar asked Sep 29 '15 11:09

Nookaraju


1 Answers

Have you tried this on real Device, too? I saw the same behavior when running in iOS Simulator but on the Device it works fine.

like image 145
Frederik Winkelsdorf Avatar answered Sep 30 '22 14:09

Frederik Winkelsdorf