1

从此代码将以原始颜色显示如何将其更改为另一种颜色?也许它需要被覆盖?

MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init];
    mail.mailComposeDelegate = self;
    if ([MFMailComposeViewController canSendMail]) {
        [mail setToRecipients:[NSArray arrayWithObjects:@"me@gmail.com",nil]];
        [mail setSubject:@"support"];
        [mail setMessageBody:@"enter your message here" isHTML:NO];
        [self presentModalViewController:mail animated:YES];
    }
4

3 回答 3

2

我还没有这样做,所以请谨慎回答这个问题。

MFMailComposeViewController继承自UINavigationController。这意味着它将拥有一个navigationBar属性。拥有 navigationBar 后,您可以修改其tintColor属性。

于 2010-03-08T08:57:54.147 回答
2

实际上,iPhone SDK 禁止您修改外观 MFMailComposeViewController。从文档(这里):

Important: The mail composition interface itself is not customizable
and must not be modified by your application. In addition, after
presenting the interface, your application is not allowed to make 
further changes to the email content. The user may still edit the
content using the interface, but programmatic changes are ignored. 
Thus, you must set the values of content fields before presenting 
the interface.

对不起...

于 2010-03-10T21:12:07.337 回答
0

从Apple Docs中更高版本的 iOS 开始,您应该使用 UIAppearance 协议

重要的

您不得修改此视图控制器呈现的视图层次结构。但是,您可以使用 UIAppearance 协议自定义界面的外观。

于 2016-07-05T13:04:06.250 回答