One of the screens in my app shows a preview of a local image and I have an action button in the top left corner that I'm using to present document interaction options:
- (IBAction)actionButtonTapped:(id)sender {
self.interactionController = [UIDocumentInteractionController interactionControllerWithURL:self.attachmentLocalUrl];
self.interactionController.delegate = self;
[self.interactionController presentOptionsMenuFromRect:self.view.frame inView:self.view animated:YES];
}
This works well as it shows an action sheet with a list of options, including email to send the attachment by email. When I click the email button, it displays a preview of the email message with my image in it. But there is one thing that doesn't work. I have customized the appearance of my app so that the navigation bar has the same colors throughout the app. Here is the code I run first in my app delegate's didFinishLaunchingWithOptions:
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
[UINavigationBar appearance].barTintColor = [UIColor blueColor];
[UINavigationBar appearance].tintColor = [UIColor whiteColor];
[UINavigationBar appearance].titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor]};
This works well for my own view controllers, but the email preview view controller displayed by UIDocumentInteractionController has its bar button items in blue instead of white. And since the other parameters are correctly applied, especially the blue background for the navigation bar, the Cancel and Send action buttons are almost invisible.
I have tried reproducing this in a simple project but I couldn't. So obviously I'm doing something in my app to interfere with the normal customization. But I can't figure out what. Any idea how I might debug that?