7

How do I combine a UIActivityViewController and a UIDocumentInteractionController? The Mail app and the Tumblr app seem to compine a UIActivityViewController with a UIDocumentInteractionController because their controllers also show the "Open in" buttons besides the UIActivities. How can I accomplish this?

christopher.online
  • 2,614
  • 3
  • 28
  • 52
  • 2
    You should upload the image using inbuilt image service or delete the link as it's broken. – Nat Nov 06 '15 at 17:35

1 Answers1

3

Use presentOptionsMenuFromRect:inView:animated: in UIDocumentInteractionController

slecorne
  • 1,720
  • 1
  • 11
  • 14
  • 1
    This does not work. It does not show any actions typical to UIActivityController such as Message, Email, and Print – fishinear Jan 08 '14 at 14:14
  • First, thank you so much! I was searching for this almost two hours… fiddling around with UIActivities etc, but it could have been so simple :) @fishinear: check (and set) the `UTI` type of your documentInteractionViewController. Probably, you may need to set it manually after allocation. – bhr Mar 18 '14 at 20:23
  • @tubtub I have set the correct UTI. I think the problem is that Apple does not know the UTI, and therefore does not know what it can do with it. I should maybe set an incorrect UTI that Apple knows about. – fishinear Mar 19 '14 at 14:53
  • @fishinear Yeah, this should work. You could try `kUTTypeText` or `kUTTypePlainText` and review the results. – bhr Mar 19 '14 at 18:57