UIDocumentInteractionController 向菜单添加自定义操作(例如电子邮件、保存到照片) [英] UIDocumentInteractionController adding custom actions to menu (eg email, save to photos)

查看:26
本文介绍了UIDocumentInteractionController 向菜单添加自定义操作(例如电子邮件、保存到照片)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始将 UIDocumentInteractionController 用于新应用,但我想知道如何向预览屏幕上显示的操作菜单添加其他操作?

I've started using UIDocumentInteractionController for a new app but I'm wondering how to add additional actions to the action menu that you get on the preview screen?

菜单似乎只列出了为给定 url 类型注册的应用程序,而且我看到 PRINT 显示在 iOS4.2 上.我想添加通过电子邮件发送并保存到照片,但没有看到扩展此菜单的方法.我可以编写我想要的动作,好吧,只是将它们添加到菜单中似乎不可能?

It seems that the menu only lists apps that have registered for a given url type plus I'm seeing PRINT showing up on iOS4.2. I would like to add send by email and save to photos but don't see a way of extending this menu. I can code the actions I want OK, it's just adding them into the menu that seems impossible?

我是否遗漏了一些明显的东西?

Am I missing something obvious?

推荐答案

你说得对,这些方法

- (BOOL) documentInteractionController: (UIDocumentInteractionController *) controller performAction: (SEL) action


- (BOOL) documentInteractionController: (UIDocumentInteractionController *) controller canPerformAction: (SEL) action

这些方法支持的操作选择器是 copy:print:.

The supported action selectors for these methods are copy: and print:.

这篇关于UIDocumentInteractionController 向菜单添加自定义操作(例如电子邮件、保存到照片)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆