views:

710

answers:

2

I'm using a tinted navigation bar and a tinted global UIToolbar in my iPhone app. In my info view, I have a button which opens a MFMailComposeViewController, and the toolbar at the top of that view (with the "cancel" and "send" button) is still blue. I'm calling the MFMailComposeViewController like this:

-(void)displayMailSheet
{

MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self;

[picker setSubject:@"..."];

NSArray *toRecipients = [NSArray arrayWithObject:@"..."];

[picker setToRecipients:toRecipients];

[self presentModalViewController:picker animated:YES]; [picker release];

}

Is it possible to change the color of that view's toolbar? If it is possible, how can I do this?

Thanks in advance,

Yassin

+2  A: 

Here you go:

[[picker navigationBar] setTintColor:[UIColor blackColor]];
mofle
Thank you for the tip. It was already posted as a comment above, but now I could mark the question as solved ;-)
Yassin
A: 

From the official MFMailComposeViewController Class reference:

Important: The mail composition interface itself is not customizable and must not be modified by your application. [...]

I think it would be a better choice presenting the default mail composition interface without any changes. Otherwise Apple may reject your application.

Let's ask here if someone had an experience in this way.

kevin
Fat Booth manages to get away with it.
coob