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)
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