Krish_anktech
Krish_anktech

Reputation: 31

Cancel not visible on MFMessageComposeViewController in blue color navigation bar

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

Answers (3)

user2387149
user2387149

Reputation: 1218

Just do this on the application:didFinishLaunchingWithOptions: or just before instantiating your controller

[[UINavigationBar appearance] setBarTintColor:[UIColor blackColor]];

Upvotes: 0

Suhit Patil
Suhit Patil

Reputation: 12023

chagning tintColor of navigationBar should work

MFMessageComposeViewController *messageController = [[MFMessageComposeViewController alloc] init];
messageController.navigationBar.tintColor = [UIColor whiteColor]; 

Upvotes: 0

SGDev
SGDev

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

Related Questions