Search code examples
swiftuinavigationbaruiimagepickercontrollerios13

UIImagePickerController Navigation Bar Tint Color not working with iOS 13


I am presenting a modal controller which is a UIImagePickerController.

I am trying to change the UIImagePickerController navigation bars' tint colour.

Prior to iOS13 this worked fine;

imagePickerController.navigationBar.tintColor = .red

I have also tried;

imagePickerController.navigationController?.navigationBar.tintColor = .red

but still no joy.

What can I try next?


Solution

  • This was resolved with rmaddy's solution in the comments.

    in AppDelegate implement;

    func configureGlobalUI() {
        UINavigationBar.appearance().tintColor = .red
    }
    

    then call in didFinishLaunchingWithOptions

    This works as I require the tintColor on all navigationBar appearances.