Reputation: 8168
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:@"[email protected]",nil]];
[mail setSubject:@"support"];
[mail setMessageBody:@"enter your message here" isHTML:NO];
[self presentModalViewController:mail animated:YES];
}
Upvotes: 1
Views: 2773
Reputation: 6824
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.
Upvotes: 0
Reputation: 4339
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...
Upvotes: 2
Reputation: 15136
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.
Upvotes: 2