Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing MFMailComposeViewController's toolbar color

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?

like image 338
iYassin Avatar asked Oct 27 '09 23:10

iYassin


1 Answers

Here you go:

[[picker navigationBar] setTintColor:[UIColor blackColor]];

for iOS 8.0

 [[picker navigationBar] setBarTintColor:[UIColor blackColor]];
like image 67
Sindre Sorhus Avatar answered Oct 02 '22 02:10

Sindre Sorhus