detect when UIPopoverController has finished presented UIImageViewcontroller

后端 未结 2 342
广开言路
广开言路 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.

提交回复
热议问题