Share over 5 images using the UIActivityViewController

I combined with UIActivityViewController to share images with Facebook:

NSArray* dataToShare = imageArray;  //This is my image array
activityViewController =
        [[UIActivityViewController alloc] initWithActivityItems:dataToShare
                                          applicationActivities:nil];
[[[self parentViewController] parentViewController] presentViewController:activityViewController animated:YES completion:nil];

Sharing works fine, but there is a problem sharing multiple images. If there are more than 5 images, it only shares the first 5; the rest are ignored. The same problem occurs when saving images in a camera roll, but for the mail composer all the images are there.

How can I solve this problem?

+4
source share
2 answers

The behavior in Photos.app is the same.

, , , Apple . , .

+2

:

UIImage *imageToShare = [UIImage imageWithData:[NSData dataWithContentsOfURL:
              [NSURL URLWithString:[NSString stringWithFormat:@"%@", _iconUrl]]]];
0

Source: https://habr.com/ru/post/1502766/


All Articles