Question

from this code will show in original color how can i change it to another color? maybe it need to be override?

MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init];
    mail.mailComposeDelegate = self;
    if ([MFMailComposeViewController canSendMail]) {
        [mail setToRecipients:[NSArray arrayWithObjects:@"me@gmail.com",nil]];
        [mail setSubject:@"support"];
        [mail setMessageBody:@"enter your message here" isHTML:NO];
        [self presentModalViewController:mail animated:YES];
    }
Was it helpful?

Solution

I haven't done this so take this answer with appropriate caution.

MFMailComposeViewController inherits from UINavigationController. That means it'll have a navigationBar property. Once you have the navigationBar you can modify its tintColor property.

OTHER TIPS

Actually, the iPhone SDK prohibits you from modifying the appearance MFMailComposeViewController. From the docs (here):

Important: The mail composition interface itself is not customizable
and must not be modified by your application. In addition, after
presenting the interface, your application is not allowed to make 
further changes to the email content. The user may still edit the
content using the interface, but programmatic changes are ignored. 
Thus, you must set the values of content fields before presenting 
the interface.

Sorry...

As of later versions of iOS in Apple Docs you should use UIAppearance protocol

Important

You must not modify the view hierarchy presented by this view controller. You can, however, customize the appearance of the interface using the UIAppearance protocol.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top