Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 460
David Lintin Avatar asked Oct 28 '22 12:10

David Lintin


1 Answers

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.

like image 173
David Lintin Avatar answered Nov 15 '22 06:11

David Lintin