如何推送 MFMailComposeViewController? (iOS 5)
我想从表格视图中呈现一个 MFMailComposeViewController。我不想使用 presentModalViewController:animated:
方法,而是推送视图控制器,因此它与此表视图中的其他动画一致。
因为 MFMailComposeViewController 是 UINavigationController 并且不支持推送导航控制器,所以我使用:
[[self navigationController] pushViewController:[mailComposer topViewController] animated:YES];
这有效,但是当我点击“取消”按钮时,它会发出警告:
呈现由其超级视图剪辑的操作表。某些控件可能不会响应触摸。在 iPhone 上尝试 -[UIActionSheet showFromTabBar:] 或 -[UIActionSheet showFromToolbar:] 而不是 -[UIActionSheet showInView:]。
UIActionSheet 底部的“取消”按钮不响应触摸。有谁知道是否可以推送 MFMailComposeViewController?
From a tableview I want to present a MFMailComposeViewController. I don't want to use the presentModalViewController:animated:
method, but instead push the view controller, so it's consistent with the other animations from this table view.
Because MFMailComposeViewController is a UINavigationController and pushing a navigation controller is not supported, I used:
[[self navigationController] pushViewController:[mailComposer topViewController] animated:YES];
This works, but when I tap the Cancel button it gives the warning:
Presenting action sheet clipped by its superview. Some controls might not respond to touches. On iPhone try -[UIActionSheet showFromTabBar:] or -[UIActionSheet showFromToolbar:] instead of -[UIActionSheet showInView:].
The Cancel button at the bottom of the UIActionSheet doesn't respond to touches. Does anyone know whether it is possible to push a MFMailComposeViewController?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将 MFMailComposeViewController 呈现为模态视图与 Apple 的 HIG 一致。将其推入导航堆栈则不是。使用
-presentModalViewController:animated:
(如果在 iOS 5 或更高版本上执行,则使用-presentViewController:animated:completion:
)Presenting a
MFMailComposeViewController
as a modal view is consistent with Apple's HIG. Pushing it onto a navigation stack is not. Use-presentModalViewController:animated:
(or-presentViewController:animated:completion:
if executing on iOS 5 or greater)