Search code examples
iosios7uiimagepickercontrollerstatusbar

Getting rid of the ios status bar in UIImagePickerController


I have a tab bar that calls a UIImagePickerController like so:

    UIImagePickerController *photo = [[UIImagePickerController alloc] init];
    photo.delegate = self;
    photo.allowsEditing = NO;
    photo.sourceType = UIImagePickerControllerSourceTypeCamera;  

    [[UIApplication sharedApplication] setStatusBarHidden:YES];

    [self presentViewController:photo animated:YES completion:nil];

But the status bar remains even witht the setStatusBarHidden to YES.


Solution

  • Go to your plist file in Xcode and this key to no

    view controller-based status bar appearance' and set to NO., that did the trick for me