[英]iOS 12.0 : Is there a way to set MFMailComposeViewController navigation bar title's text to white?
Currently, I haven't found a way to do this for iOS 12.0.目前,我还没有找到针对 iOS 12.0 执行此操作的方法。 I've tried setting bar tint like so.
我试过像这样设置条形色调。
[mailController.navigationBar setTintColor:[UIColor whiteColor]];
Then, I tried setting the title text attribute with the following code然后,我尝试使用以下代码设置标题文本属性
[mailController.navigationController.navigationBar setTitleTextAttributes:
@{NSForegroundColorAttributeName:[UIColor WhiteColor]};
I've tried more options that I found on StackOverflow, but none of them worked.我尝试了在 StackOverflow 上找到的更多选项,但都没有奏效。 I am hoping that someone found a reliable way to change the navigation bar title text color.
我希望有人找到一种可靠的方法来更改导航栏标题文本颜色。 It stays black no matter what I do.
无论我做什么,它都会保持黑色。 The bar button's colors change correctly, but not the navigation bar title.
栏按钮的颜色正确更改,但导航栏标题没有正确更改。
Can you please try either one of these which lets you set the navigation bar color.您可以尝试使用其中一种来设置导航栏颜色吗? For example: If the navigation bar is black color, then the text is set to white.
例如:如果导航栏为黑色,则文本设置为白色。
[[UINavigationBar appearance] setBarStyle: UIBarStyleBlack]
or或者
[[UINavigationBar appearance] setBarTintColor:[UIColor whiteColor]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.