John Lane
John Lane

Reputation: 1132

Custom UINavigationBar for MFMailComposeViewController

I have a UINavigationBar with an image for its tint to customize its appearance. However when I present the mail composer as a modal view the default UINavigationBar is displayed. Any suggestions how I can change that so that my custom bar is displayed?

Upvotes: 1

Views: 1383

Answers (1)

mattjgalloway
mattjgalloway

Reputation: 34912

You can access the navigation bar directly like so:

MFMailComposeViewController *viewController = [[MFMailComposeViewController alloc] init];
viewController.navigationBar.tintColor = [UIColor blueColor]; ///< Or whatever colour you want to tint it / set the background image to, etc.

Upvotes: 2

Related Questions