简体   繁体   English

如何在MFMailComposerViewController中设置标题?

[英]How to set title in the MFMailComposerViewController?

I am trying to set the title of MFMailComposerViewController , which is a subclass of UINavigationController. 我正在尝试设置MFMailComposerViewController的标题,它是UINavigationController的子类。

I am using these following ways : 我正在使用以下方式:

 MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
 [picker.navigationController navigationItem].title = @"Send Mail";
 [[picker navigationItem] setTitle:@"Send Mail"];

But I am not able to set the Title. 但是我无法设置标题。

Am i doing it wrong ?? 我做错了吗? Is there any other method to do so ?? 还有其他方法可以这样做吗?

Thanks 谢谢

The title is updated whenever the subject changes. 每当主题更改时,标题都会更新。 You cannot change the title programmatically within AppStore restrictions. 您无法在AppStore限制内以编程方式更改标题。 You may use -setSubject: to initialize the subject. 您可以使用-setSubject:初始化主题。

(A bad way to solve this is to create a very high-level window with a label that covers original title. This is very difficult to make this work with orientation change.) (解决此问题的一种不好的方法是使用覆盖原始标题的标签创建一个非常高级的窗口。这很难通过方向更改来完成。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM