Getting the “Open in…” overlay in iOS via SDK

2019-07-01 23:18发布

问题:

I have an iOS app which offers the opportunity to open documents in other applications via UIDocumentInteractionController. Neither presentOpenInMenuFromRect nor presentOpenInMenuFromBarButtonItem does the Safari-style overlay menu of "Open in..." "Open in iBooks" that you get when viewing a PDF (for instance) and those appear to be the only ways to ask for a menu. My "Open In" menu does work, it's just not the UI experience I am trying to offer. Is this functionality in a private framework or am I missing something more obvious?

Edit: I suspect it's a toolbar with 2 buttons, and I just can't have it unless I build one myself, having looked harder. Still looking for confirmation or denial.

回答1:

Sorry, it's denial... It's not possible under the official SDK to:

  • Get a list of applications that open a certain file.
  • Open a certain file on a certain application (other than the URL schemes registered).