Custom "Email" action in UIDocumentInteractionController
Asked Answered
S

2

13

Is there any way to add a custom action to the list of actions provided by the UIDocumentInteractionController?

I would like to add an "Email" action to the list. I know I can use the MFMailComposeViewController to send email with attachments, but the problem is not how to send a file as an attachment the problem is one of UI. I have an "Action" UIBarButtonItem which brings up the UIDocumentInteractionController providing options for printing and opening in iBooks. Great... but I also need a separate UIBarButtonItem for sending the file attached to an email. It's slightly confusing to users to see something like this:

Screenshot of Email and Action buttons

It's not just confusing to users, but really not an ideal UI. It would be best to have "Email" as one of the options in the UIDocumentInteractionController's list.

Any suggestions?

Kenny

Sinister answered 14/4, 2011 at 21:52 Comment(1)
Possible duplicate of: #5205411Diary
N
3

You cannot add items to the Document Interaction Controller at this time.

Newsstand answered 23/6, 2011 at 10:28 Comment(1)
You might want to group actions that can be performed on the current document on an action sheet accessible via this button with the square and the arrow. This is the general symbol for that. The document interaction controller is actually meant to hand off a document to another app, not perform actions inside yours.Newsstand
R
0

Send by email and SMS are not available while using

- (BOOL)presentOpenInMenuFromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated;

or

 - (BOOL)presentOpenInMenuFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated;

Consider using

- (BOOL)presentOptionsMenuFromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated;

instead.

Rommel answered 18/11, 2014 at 8:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.