0

According to the accepted answer to this SO question, the correct, Apple-approved way to set the subject of an email through the activityviewcontroller is to use the following method:

activityViewController:subjectForActivityType:

Can anyone provide an example of how to use this?

For example, how would I set the subject for an activity view controller named AVC.

 UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems: activityItems applicationActivities:nil];

NSString *subject = @"Check this out";
Community
  • 1
  • 1
Arjun
  • 89
  • 1
  • 9
  • http://stackoverflow.com/questions/28070038/how-to-set-mail-subject-with-uiactivityitemprovider –  Jan 26 '17 at 03:16
  • The accepted answer does not show how to call it. I do not believe it's a delegate as I included this method and declare the protocol but it does not fire. The other answer (valueforKey) is undocumented. – Arjun Jan 26 '17 at 03:47
  • it is a subclassed custom subclassed itemprovider. Check this thread a better more informed solution http://stackoverflow.com/questions/20581389/how-do-i-use-uiactivityitemprovider-to-send-an-email-with-attachment-with-uiacti –  Jan 26 '17 at 04:12

0 Answers0