I am using UIActivityViewController
to share text to Outlook, everything is working fine except for two things, one I can't set a subject line and two I cant set a title of that I am sharing, my text is html table and it is currently shown the first part of it in my implementation (see screenshot) although I'd like to show a preview title.
Is there a way to set the title and a way to set the subject?
Here is my code:
let activityViewController = UIActivityViewController(activityItems : [htmlString], applicationActivities: nil)
activityViewController.popoverPresentationController?.barButtonItem = self.shareButton
self.present(activityViewController, animated: true, completion: nil)
I have tried to set the subject like so:
activityViewController.setValue("This is my subject", forKey: "subject")
But it didn't work
What am I doing wrong?
Here is the screenshot of the title I was talking about:
But it didn't work