detect when UIPopoverController has finished presented UIImageViewcontroller

后端 未结 2 341
广开言路
广开言路 2021-01-21 07:45

I have the UIImagePickerController as a content View Controller for the UIPopoverController. I need to detect when the popover has just finished presented (has just showed up).

相关标签:
2条回答
  • 2021-01-21 08:20

    The UIImagePickerDelegate is also a UINavigationControllerDelegate.

    Your class should implement UINavigationControllerDelegate and include the following:

     -(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
         // [navigationController setNavigationBarHidden:YES];
          [[UIApplication sharedApplication] setStatusBarHidden:YES];  // This one works for me: OP
        }
    

    I've tested this and it hides the navigation bar. I am not sure if doing so conflicts with the HIG though.

    0 讨论(0)
  • 2021-01-21 08:33

    Thise should help:

    • UIImagePickerControllerDelegate and imagePickerController:didFinishPickingMediaWithInfo:
    • UIPopoverControllerDelegate popoverControllerDidDismissPopover

    You have delegates for both

    0 讨论(0)
提交回复
热议问题