I have implemented a UIActivityViewController, for sharing some information. In this case I have a question: Is it possible to make a different text between the facebook sharing/twitter sharing/ or mail sharing? That the text which is set is different from the others...
A good UIActivityViewController tutorial would be very useful.
My code at the time is, for displaying text and image:
NSString *text = @"Lime Cat";
UIImage *image = [UIImage imageNamed:@"MyApp Icon 512x512.png"];
NSArray *items = [NSArray arrayWithObjects:text,image , nil];
But how can I manage it that the NSString is just for the mail, and make a seperate NSString for the facebook share option?
Any suggestions?
Thanks.
you can go to the link bellow, there is a tutorial that can help you :
https://www.albertopasca.it/whiletrue/objective-c-custom-uiactivityviewcontroller-icons-and-text/
You can have your class conform to the UIActivityItemSource
protocol and implement activityViewController:itemForActivityType:
. The activityType
will be FB, Twitter, Messages app, etc, so you can do a switch on it and return a different object based on the activity.
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