ios - MFMailComposeViewController 导航条

标签 ios image email background

我的应用程序具有导航栏的自定义背景。所以我做了一个这样的分类

@implementation UINavigationBar (CustomImage)
- (void)drawRect:(CGRect)rect 
{
    UIImage *image = [UIImage imageNamed: @"image.png"];
    [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
@end

在我的应用程序中,我必须使用 MFMailComposeViewController。我创建它就像

MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];

但是 Apple 的文档说明了这一点

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.

所以这意味着我不能将我的“image.png”保留为邮件编辑器 View Controller 的导航栏背景。

如何做到这一点?

谢谢

最佳答案

简而言之,您不能使用标准的苹果 MFMailComposeViewController。您通常会以模态方式呈现它,因此无论如何它都会完全超出您的视野。

如果您想要自定义外观的撰写表,则必须将其创建为具有自定义 View 的自定义 Controller 。您还需要在您的应用程序中内置一个邮件服务器,或者您可以点击它来为您发送邮件的服务器。

出于安全原因,Apple 限制了您可以使用 MFMailComposeViewController 执行的操作。

如果我能提供更多帮助,请务必询问 :)

关于ios - MFMailComposeViewController 导航条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9047404/

相关文章:

multithreading - 无法从 Delphi 中的线程使用 ICS (THtmlSmtpCli) 发送电子邮件

ios - iPad上的iPhone应用程序:UILabel,UITextView文本以2倍查看时像素化

iphone - 如果分发证书已更新,iphone app update 可以访问钥匙串(keychain)吗?

image - Raspberry Pi 相机教程问题

javascript - slider 拒绝将照片居中,强制左对齐

java - 使用 Java 的适用于 Android 的 SendGrid API

java - 删除空格后电子邮件地址中存在非法字符

ios - UIView.animate() 在 View 唤醒时卡住

ios - 如何在 UIAlertViewController 中添加 UICollectionView?

c# - 使用 C# 显示图像