UIDocumentInteractionController adding custom actions to menu (eg email, save to photos)

Roger picture Roger · Mar 5, 2011 · Viewed 7.6k times · Source

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?

Answer

user552120 picture user552120 · May 3, 2011

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:.