In iOS 13 some things seem to have changed in terms of customizing the navigation bar appearance. I want to customize the navigation bar of a
UIImagePickerController
. According to iOS 13 guidelines the code to change an existing navigation bar (in this case changing the UIImagePickerController
navigation bar background color to red) would be:let imagePickerViewController = UIImagePickerController()
let barAppearance = UINavigationBarAppearance()
barAppearance.configureWithDefaultBackground()
barAppearance.backgroundColor = .red
imagePickerViewController.navigationBar.standardAppearance = barAppearance
imagePickerViewController.navigationBar.scrollEdgeAppearance = barAppearance
Unfortunately, this does not work. In general setting
imagePickerViewController.navigationBar
appearance does not have any influence on the presented UIImagePickerController
.The only thing that seems to be working is changing the default appearance of all
UINavigationBars
like this:UINavigationBar.appearance().tintColor = .red
But this does not allow individual customization and does not allow for extending the navigation bar with your own
UIBarButtonItems
and other navigation bar elements.I have seen discussion about this topic, but none of those discussions has a working answer and none of them discusses if apple has made any changes in terms of general customizability of the
UIImagePickerController
. So here are my questions:- Did apple remove the option of customizing the navigation bar of an
in iOS 13?UIImagePickerController
- If not, how do you actually customize the navigation bar of an
in iOS 13?UIImagePickerController