Exclude AirDrop and Add to Reading List from apps build with iOS 6 SDK

二次信任 提交于 2019-11-29 09:56:54

excludedActivityTypes is a valid property in iOS 6.0 and above, so you can leverage that. The constants you need (UIActivityTypeAddToReadingList and UIActivityTypeAirDrop) are not available so what you can do is use their literal values (most likely the same as the variable name) until you recompile with the iOS 7 SDK (Which I suggest you do. It is not likely that Apple would change a constant value but it is better programming practice to use the variable instead of its literal). I imagine these values would be ignored in iOS 6.x and not cause any problems since any UIActivity can define its own name so the system has no way of validating a given type. It most likely will just add them to an internal ignore list.

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