0

hi I implemented activityViewController and my activityItems is text when I press button this will pop up and I choose mail IMPORTENT : when I choose it my text in the (activityItems) go to the message body but I want it to go in sender message textfield (To :)

how should I implement this???

@IBAction func activityView(_ sender: UIButton) {
    let text = "Mahdi.m@email.com"
    let img = UIImage(named: "Buliding")!
    let activityViewController = UIActivityViewController(activityItems: [text, img], applicationActivities: nil)
    activityViewController.popoverPresentationController?.sourceView = self.view
    activityViewController.excludedActivityTypes = [ UIActivityType.airDrop]
    self.present(activityViewController, animated: true, completion: nil)
}
MahdiM
  • 41
  • 9

0 Answers0