更改MFMailComposeViewController的工具栏颜色 [英] Changing MFMailComposeViewController's toolbar color

查看:498
本文介绍了更改MFMailComposeViewController的工具栏颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的iPhone应用程序中使用有色导航栏和有色全局UIToolbar。
在我的信息视图中,我有一个按钮打开一个MFMailComposeViewController,该视图顶部的工具栏(取消和发送按钮)仍然是蓝色的。我像这样调用MFMailComposeViewController:

I'm using a tinted navigation bar and a tinted global UIToolbar in my iPhone app. In my info view, I have a button which opens a MFMailComposeViewController, and the toolbar at the top of that view (with the "cancel" and "send" button) is still blue. I'm calling the MFMailComposeViewController like this:

-(void)displayMailSheet
{

    MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
    picker.mailComposeDelegate = self;

    [picker setSubject:@"..."];

    NSArray *toRecipients = [NSArray arrayWithObject:@"..."]; 

    [picker setToRecipients:toRecipients];

    [self presentModalViewController:picker animated:YES];
    [picker release];

}

是否可以更改视图工具栏的颜色?

Is it possible to change the color of that view's toolbar? If it is possible, how can I do this?

提前感谢,

Yassin

推荐答案

这里:

[[picker navigationBar] setTintColor:[UIColor blackColor]];

 [[picker navigationBar] setBarTintColor:[UIColor blackColor]];

这篇关于更改MFMailComposeViewController的工具栏颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆