Buttons not visible on MFMailComposeViewController

I have a project working with a custom navigationBar. I added the following code before initializationMFMailComposeViewController

// Create image for navigation background - portrait
UIImage *navBar = [[UIImage imageNamed:@"HeaderStrip.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
[[UINavigationBar appearance] setBackgroundImage:navBar forBarMetrics:UIBarMetricsDefault];

// Create image for navigation background - landscape
UIImage *navBarL = [[UIImage imageNamed:@"HeaderStrip.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 100)];
[[UINavigationBar appearance] setBackgroundImage:navBarL forBarMetrics:UIBarMetricsLandscapePhone];

      

Here HeaderStrip.png

is a simple red image. Then in the following method I have returned the navigation to its original background image

-(void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error

      

Everything works as expected except for the visibility of the Submit and Cancel buttons in the mail composer's navigation bar. I've tried using tintColor before initialization MFMailComposeViewController

:

[UINavigationBar appearance].tintColor = [UIColor whiteColor];

      

Irrelevant.

I also tried to install tintColor

navigationBar

composer after selection, the result is the same:

MFMailComposeViewController *mailer= [[MFMailComposeViewController alloc] init];
mailer.navigationBar.tintColor = [UIColor whiteColor];

      

Anyone got a solution to the problem? How do I make buttons visible?

+3


source to share





All Articles