Search code examples
iosuiimagepickercontrollerstatusbar

Status bar colour for UIImagePickerController


We use blue navigation bar colour and white text colour:

status bar

However when I create UIImagePickerController it changes the colour for status bar:

saved photos

Are there any workarounds?


Solution

  • Based on answer here UIImagePickerController breaks status bar appearance. I fixed it with

    picker.delegate = self;
    

    and

    - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
    {
        [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
    }