Reputation: 31
In my application my navigation bar color is blue.
While opening MFMessageComposeViewController
its cancel button color is also blue so user is not able to see cancel button.
Cancel button is performing action, i cam dismiss MFMessageComposeViewController
by clicking it.
Is there any way i can change cancel button color other than blue?
Upvotes: 3
Views: 1069
Reputation: 1218
Just do this on the application:didFinishLaunchingWithOptions:
or just before instantiating your controller
[[UINavigationBar appearance] setBarTintColor:[UIColor blackColor]];
Upvotes: 0
Reputation: 12023
chagning tintColor
of navigationBar should work
MFMessageComposeViewController *messageController = [[MFMessageComposeViewController alloc] init];
messageController.navigationBar.tintColor = [UIColor whiteColor];
Upvotes: 0
Reputation: 2252
try this code.
MFMailComposeViewController* mailViewController = [[MFMailComposeViewController alloc] init];
mailViewController.mailComposeDelegate = self;
[mailViewController setToRecipients:@[@"[email protected]"]];
[mailViewController.navigationBar setTintColor:[UIColor orangeColor]];
[self presentViewController:mailViewController animated:YES completion:nil];
Upvotes: 1