MFMailComposeViewController iphone 键盘没有 DONE 或 CANCEL
MFMailComposeViewController 附带的键盘一旦出现就没有任何方法可以关闭键盘。 有谁有换键盘的想法吗?由于您当时实际上在邮件客户端中,所以没有暴露 UITextField
。
The keyboard that comes up with MFMailComposeViewController
does not have any means to dismiss the keyboard once it comes up.
Does anyone have an idea of changing the keyboard. There are no UITextField
exposed as you are actually in mail client at the time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
邮件编辑器不是您可以修改的,它是系统提供的视图控制器,在文档中明确告诉您不要修改:
左上角已经有取消按钮,“完成”会做什么?发送电子邮件?那是在右上角。
The mail composer isn't yours to modify, it is a system provided view controller which you are explicitly told not to modify in the docs:
The cancel button is already there in the top left, what would "Done" do? Send the email? That's in the top right.
MFMailComposeViewController 没有“完成”按钮,因为它假设您将使用该按钮作为返回键(以创建新行)。
如果您确实想将按钮更改为“完成”按钮,我只能想到一种方法:
当您找到作为正文的 UITextView 时,请执行以下操作:
在 -textViewShouldEndEditing 上返回 YES。实现所有 UITextViewDelegate 方法,并调用originalTextViewDelegate(有点像在子类上调用“super”)。
这应该可行,但不能保证。希望有帮助! :D
The MFMailComposeViewController doesn't have a "Done" button, because it assumes you will use that button as a return key (to make a new line).
If you really wanted to change the button to a "done" button, there is only one way I can think to do it:
When you've found the UITextView that is the body, do the following:
Return YES on -textViewShouldEndEditing. Implement ALL UITextViewDelegate methods, and call originalTextViewDelegate (kind of like calling "super" on a subclass).
That should work, but no guarantees. Hope that helps! :D