Showing posts with label UIActivityViewController. Show all posts
Showing posts with label UIActivityViewController. Show all posts

Thursday 28 November 2013

sharing via option for ios

Using UIActivityViewController you can share anything from app, see the below example code

Import two packages

#import <Social/Social.h>
#import <MobileCoreServices/MobileCoreServices.h>

-(IBAction)shareLink:(NSArray *)link{
    link = @[@""];     //for single object either text ot image or etc
    UIActivityViewController *act = [[UIActivityViewController alloc] initWithActivityItems:link applicationActivities:nil];
    [self presentViewController:act animated:YES completion:nil];
}