Created
October 20, 2014 09:10
-
-
Save makzan/83c0e48a4cb660787970 to your computer and use it in GitHub Desktop.
Basic usage of UIActivityViewController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (IBAction)shareAction:(id)sender { | |
NSString *title = [NSString stringWithFormat:@"I'm reading this great product: %@",self.titleLabel.text]; | |
NSURL *url = [NSURL URLWithString:@"http://example.com"]; | |
UIActivityViewController *actionController = [[UIActivityViewController alloc] initWithActivityItems:@[title, url] applicationActivities:nil]; | |
[self.navigationController presentViewController:actionController animated:YES completion:nil]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment