简体   繁体   English

取消在蓝色导航栏中的MFMessageComposeViewController上不可见

[英]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. 打开MFMessageComposeViewController其取消按钮颜色也是蓝色,因此用户无法看到取消按钮。

Cancel button is performing action, i cam dismiss MFMessageComposeViewController by clicking it. 取消按钮正在执行操作,我通过单击它来解除MFMessageComposeViewController

Is there any way i can change cancel button color other than blue? 有什么办法可以改变蓝色以外的取消按钮颜色吗?

try this code. 试试这段代码。

MFMailComposeViewController* mailViewController = [[MFMailComposeViewController alloc] init];        
mailViewController.mailComposeDelegate = self;
[mailViewController setToRecipients:@[@"email@apple.com"]];

[mailViewController.navigationBar setTintColor:[UIColor orangeColor]];

[self presentViewController:mailViewController animated:YES completion:nil]; 

chagning tintColor of navigationBar should work chagning tintColor of navigationBar应该可以工作

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

只需在application:didFinishLaunchingWithOptions:上执行此操作application:didFinishLaunchingWithOptions:或者在实例化控制器之前执行此操作

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM