Search code examples
iosmfmailcomposeviewcontroller

Transparent buttons in UIMailComposeViewController


I'm actually having the opposite problem of this and this StackOverflow question. The 'Cancel' and 'Send' buttons on my instance of MFMailComposeViewController are both transparent. I've attached screenshots to show this.

Cancel Button

Send Button

When I set up the instance of the MFMailComposeViewController, I don't have any code changing the color from the system default. How do I make sure that these buttons are the system default color?


Solution

  • As @Krumelur suggested, the appearance options were being set somewhere else in my app. The solution to override these options was to insert the following line in the method where the instance of MFMailComposeViewController was initialized:

    mailComposer.navigationBar.tintColor = [UIColor blackColor];