Open activity without showing UIActivityViewController

前端 未结 3 1074
攒了一身酷
攒了一身酷 2021-02-05 20:35

I want to be able to have social icons in a scrollView, which when clicked, functions the same way it would if I had clicked on them after presenting a UIActivityViewController.

3条回答
  •  耶瑟儿~
    2021-02-05 21:11

    Yodel : They have made their own custom view, and they have picked some common apps like whatsapp,snapchat,messenger etc for which openurl common, they have checked each one by using "canOpenUrl" to check whether given app is available on user's mobile. If available then show its icon. When user clicks on it, it will open given app by using "openUrl".

    Here, In yodel you can see that, it is not able to take all the available sharing apps, it is only able to predefined fix apps they have defined. For other apps, they have added "more button" at end, which on clicking will open UIActivityViewController .

提交回复
热议问题