This is the correct answer for iOS 7, 8, 9, and 10:
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[[picker navigationBar] setTitleTextAttributes:[NSDictionary dictionaryWithObject:[UIColor blackColor] forKey:NSForegroundColorAttributeName]];
Here is why:
The check marked answer above (by Mani) referencing [UINavigationBar appearance]
is incorrect as it will change the color of the title in the UINavigationBar
that is popping the MFMailComposeViewController
as well, which was an effect I didn't want. You need to specifically get the picker's NavBar as my code does.
Setting tintColor
is also incorrect as of iOS 7 (the other answer by Mani) as it sets the colors of the buttons, not the title.
Also, UITextAttributeTextColor
is now deprecated, please use NSForegroundColorAttributeName
.