I found a repository on gifthub that is exactly what i was looking for. Can you help me how to code this to work with a single button. I don't enough experience yet with ios programmin to do this. I almost finished building my first app, but i need help with this.
Thanks in advance
https://github.com/BobDG/BDGShare
For a beginner I suggest this.. Its much easier. Just a few lines of code.
- (IBAction)shareButtonPressed:(id)sender {
NSLog(@"shareButton pressed");
NSString *texttoshare = @"text to share";
UIImage *imagetoshare = [UIImage imageNamed:@"beck.png"];
NSArray *activityItems = @[texttoshare, imagetoshare];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
activityVC.excludedActivityTypes = @[UIActivityTypeAssignToContact, UIActivityTypePrint, UIActivityTypePostToTwitter, UIActivityTypePostToWeibo];
[self presentViewController:activityVC animated:TRUE completion:nil];
}
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