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

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

问题描述

我开始为新应用程式使用UIDocumentInteractionController,但我想知道如何在预览画面上为操作选单新增其他动作。



看起来菜单只列出已注册给定的URL类型的应用程序,我看到PRINT出现在iOS4.2。我想添加通过电子邮件发送,并保存到照片,但没有看到一个扩展此菜单的方法。



我缺少一些显而易见的东西?

 <$ c $ 

(UIDocumentInteractionController *)控制器canPerformAction:(SEL)action $ b(BOOL)documentInteractionController:(UIDocumentInteractionController *)controller performAction:(SEL)action


这些方法支持的操作选择器为 copy:


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?

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?

解决方案

You are correct, These are the methods

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


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

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

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

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