I want to set subject for email sharing in UIActivityViewController
and also want to share in Twitter. I know in Twitter if we want to share — we need compress text to 140 chars. I checked many SO solutions, but nothing is working.
Is this issue fixed in latest iOS releases? Any other "working solutions"?
Check below code for the email for setting up your email subject:
UIActivityViewController* avc = [[UIActivityViewController alloc] initWithActivityItems:@[@"Your String to share"] applicationActivities:nil]; [avc setValue:@"Your email Subject" forKey:@"subject"]; avc.completionHandler = ^(NSString *activityType, BOOL completed) { // ... };
Here the line
[avc setValue:@"Your email Subject" forKey:@"subject"];
Makes the subject as "Your email Subject" if user picks email option in the UIActivityViewController.
I hope it helps...
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