Customize the Appearance of the Navigation Bar Shown Above the Crop UI

Q: How do I customize the appearance of the navigation bar shown above the crop UI after taking a photo with the camera when adding an image annotation?

A: This navigation bar is part of ImagePickerController, which is a subclass of UIImagePickerController, which is a subclass of UINavigationController. You can use UIAppearance to customize all instances of this class like this:

1
UINavigationBar.appearance(whenContainedInInstancesOf: [ImagePickerController.self]).barTintColor = UIColor.systemYellow
1
[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[PSPDFImagePickerController.class]].barTintColor = UIColor.systemYellowColor;

If you need to access a particular instance of the picker controller, you could use the PDFViewController delegate method pdfViewController(_:shouldShow:options:animated:).

This will look like this: