UIActivityViewController exclude all UIActivityCat

2019-05-04 20:51发布

I have instantiated a UIActivityViewController. Conveniently, I can exclude individual activity types using the property excludedActivityTypes.

I now want to exclude the activity category UIActivityCategoryAction. How can I exclude an activity category, as opposed to an individual activity type?

1条回答
我想做一个坏孩纸
2楼-- · 2019-05-04 21:40

As per current documentation, you can't but you could build an array holding all the individual types of an UIActivityCategory and pass it to the excludedActivityTypes property.

If you fear that over time Apple could add new activity types and your UIActivityViewController will show the new types, fear not because it will not happen unless you update the app using the new SDK. So you're safe in this regard.

查看更多
登录 后发表回答