如何在 MFMailComposerViewController 中设置标题?
我正在尝试设置 MFMailComposerViewController 的标题,它是 UINavigationController 的子类。
我正在使用以下方法:
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
[picker.navigationController navigationItem].title = @"Send Mail";
[[picker navigationItem] setTitle:@"Send Mail"];
但我无法设置标题。
我做错了吗? 还有其他方法可以做到这一点吗?
谢谢
I am trying to set the title of MFMailComposerViewController , which is a subclass of 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每当主题发生变化时,标题就会更新。您无法在 AppStore 限制内以编程方式更改标题。您可以使用
-setSubject:
来初始化主题。(解决这个问题的一个不好的方法是创建一个非常高级的窗口,其标签覆盖原始标题。这很难通过方向更改来实现。)
The title is updated whenever the subject changes. You cannot change the title programmatically within AppStore restrictions. You may use
-setSubject:
to initialize the subject.(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.)