How to hide status bar in UIImagepickercontroller?

前端 未结 13 1913
眼角桃花
眼角桃花 2020-11-30 02:55

I am new to iOS development. I am trying to hide status bar in UIImagePickerController. Whenever I click on \"Take photo\", status bar appears. It doesn\'t hide

13条回答
  •  無奈伤痛
    2020-11-30 03:45

    Please try this.

    • Setting a delegate for the UIImagePickerController

    • hide the status bar in the delegate's navigationController:didShowViewController:animated: function.

    E.G:

    -(void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated 
    {
    [[UIApplication sharedApplication] setStatusBarHidden:YES];
    }
    

提交回复
热议问题