UIActivityViewController customize text based on selected activity

后端 未结 3 1411
生来不讨喜
生来不讨喜 2020-12-16 09:46

I want to customize text for the same information but when I am sharing it on Facebook I don\'t want to use the twitter hash tags or @username scheme...

How can I di

3条回答
  •  有刺的猬
    2020-12-16 10:11

    Instead of passing the text strings into the initWithActivityItems call, pass in your own sub-class of the UIActivityItemProvider class and when you implement the itemForActivityType method it will provide the sharing service as the 'activityType' parameter.

    You can then return the customized content from this method.

提交回复
热议问题