如何更改MFMailComposeViewController中的按钮? [英] How to change buttons in MFMailComposeViewController?
本文介绍了如何更改MFMailComposeViewController中的按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的应用程序中,我正在使用MFMailComposeViewController。我在标题栏中放置了返回
和完成
按钮。我的标题栏是黑色的,但我有蓝色的按钮背景。如何将按钮背景颜色更改为黑色
颜色?
In my app I am using the MFMailComposeViewController. I have placed a back
and Done
button in the title bar. I have the title bar to be in black color, but I have the button background in blue color. How to change the button background color to black
in color?
推荐答案
首先必须更改按钮样式:
barButton.style = UIBarButtonItemStyleBordered;
You first have to change the button style:
barButton.style = UIBarButtonItemStyleBordered;
之后,可以使用以下代码更改导航栏按钮的颜色:
Afterwards, the color of the navigation bar buttons can be changed with the following code:
[[mailComposer navigationBar] setTintColor:[UIColor blackColor]];
这篇关于如何更改MFMailComposeViewController中的按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文