UIActivityViewController & UIDocumentInteractionController not showing options

后端 未结 4 2147
青春惊慌失措
青春惊慌失措 2021-02-08 09:01

I am new to UIActivityViewController and perhaps I am missing a basic understanding. What I am trying to do is attached a csv, xml and vcard file to activity controller and show

4条回答
  •  心在旅途
    2021-02-08 09:32

    UIActivityViewController only shows standard built-in activities plus any custom activities you pass as applicationActivities.

    For what you are doing, you don't want UIActivityViewController. You want a UIDocumentInteractionController. If you just want to display existing apps that can open the file, use one of the presentOpenInMenuFrom... methods.

    But note that is to be used for just a single file, not three.

    Passing three files makes no sense in this context.

提交回复
热议问题