Skip to content

Instantly share code, notes, and snippets.

@glebd
Created January 23, 2013 22:34
Show Gist options
  • Save glebd/4615001 to your computer and use it in GitHub Desktop.
Save glebd/4615001 to your computer and use it in GitHub Desktop.
Using NSSharingServicePicker in Mountain Lion
- (IBAction)displaySharePicker:(id)sender {
NSMutableArray *shareItems = [@[self.currentPicture.image] mutableCopy];
NSSharingServicePicker *sharingServicePicker = [[NSSharingServicePicker alloc] initWithItems:shareItems];
sharingServicePicker.delegate = self;
[sharingServicePicker showRelativeToRect:[sender bounds] ofView:sender preferredEdge:NSMinYEdge];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment