Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIActivityViewController with integrated gallery (like in the stock Photos iPad app)

If you launch the Photos app on iPad (iOS7) and tap the action button, you get a UIActivityViewController whose top half is made of a multi-select gallery, from within which you can select any number of items. The sharing options automatically adjust from your selection (for example "Twitter" and "Assign To Contact" disappear if you select more than one item).

I have found nothing that appears to support this in the iOS7 SDK, so I wonder if this feature is unavailable to developers. Does anyone know how such a thing can be done?

like image 641
Clafou Avatar asked Oct 11 '13 10:10

Clafou


1 Answers

When using a UIActivityViewController you can set an array of items that you wish to share. Normally this is just an image and maybe a string (for tweeting an image, for example) however if you add multiple images to the array that you use in - (id)initWithActivityItems:(NSArray *)activityItems applicationActivities:(NSArray *)applicationActivities; you can share more than one image (and such 'Assign to contact' or 'Tweet' aren't available because they need only one image).

like image 111
Thomas Denney Avatar answered Oct 21 '22 09:10

Thomas Denney