I have googled, and get some solutions, it seems the only possible way is thru UIDocumentInteractionController
. I have found the result that able to share text ONLY, also found result that share image ONLY.
But what I want is share BOTH.
I know this question may be duplicated, I just wanted to make it clear, here is the screenshot...
(This is shared from Android)
For iOS Users Just open the image and choose the WhatsApp contact to whom you need to send the file to. Now, choose Document instead of Photo and select the image file you want to share for Files. That's it. The photo will be sent as an uncompressed file.
You can use UIActivityViewController to share image , text or URL .Here is a small example :
NSString *textToShare = @"Enter your text to be shared"; UIImage * image = [UIImage imageNamed:@"imagename"]; NSArray *objectsToShare = @[textToShare, image]; UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil]; [self presentViewController:activityVC animated:YES completion:nil];
Run the above code and select whats app to share if you want you can share by other mediums also . This is apple' s default share method
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With