Reputation: 15
I present a MFMailComposeViewController in this way:
[self presentViewController:composer animated:YES completion:nil];
The Cancel button of mail composer automatically takes the color of
[[UIView appearance] tintColor];
When I dismiss the mail composer with:
[controller dismissViewControllerAnimated:YES completion:nil];
the back button (only the standard back arrow) of the visible controller change from White to the view tintColor (like the Cancel button of the composer) and I can't change it. I need it white because the navigation bar background is set to the tintColor.
Someone could help me?
Thanks
SOLUTION
In the application NEVER set the [[UIView appearance] tintColor]
property. Instead set the [[self view] tintColor]
when it needs. All works and backButton remains white as I want.
Upvotes: 1
Views: 978
Reputation: 877
Tint color is inherited across the entire view hierarchy. It sounds like you may be setting the global tint color for all UIViews before presenting the mail composer which is what happens if you call:
[[UIView appearance] setTintColor:[UIColor orangeColor]];
Instead, try setting the tint color just for the mail composer controller by adding this line prior to presenting it:
//Set the tint color on just the composer controller as needed here before presenting
[composer.view setTintColor:[UIColor orangeColor]];
Upvotes: 2