UIActivityViewController exclude all UIActivityCategoryAction

非 Y 不嫁゛ 提交于 2019-12-10 09:32:09

问题


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:


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.



来源:https://stackoverflow.com/questions/29424570/uiactivityviewcontroller-exclude-all-uiactivitycategoryaction

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!