iOS 8 - Disable iCloud Photo Sharing Activity

你说的曾经没有我的故事 提交于 2019-12-12 07:56:47

问题


Apparently iOS8 by default adds a "iCloud Photo Sharing" activity to activity views in iOS8 and I haven't found any useful documentation regarding it, especially how to explicitly remove it (going into the "More" option allows the user to toggle showing/hiding it, but for our app we want to completely disallow this option).

Has anyone figured anything out about how to disable this? Any input would be appreciated. Thanks!


回答1:


If you init your UIActivityViewController with full of images, iCloud sharing set to activity types by default. You can add a string in your activityItems array. This move will cause that iCloud sharing to be removed from activityTypes.

NSArray *Items   = [NSArray arrayWithObjects: image1, image2, @"", nil];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:Items applicationActivities:nil];



回答2:


Normally you'd set the excludedActivityTypes property on your UIActivityViewController instance -- e.g., to exclude posting to Facebook, you'd put UIActivityTypePostToFacebook in that array.

But it doesn't look like the Built-in Activity Types list (either in the documentation or in UIActiviy.h) includes a constant for iCloud Photos. That's probably worth filing a bug about.



来源:https://stackoverflow.com/questions/25796125/ios-8-disable-icloud-photo-sharing-activity

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