I am hoping someone can help me with something I've not done before. which is attach an image from a image view and put it into my email in app. i have all other fields working correctly I just cannot add my image.
thanks in advance for help
class SecondViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
@IBOutlet var imageView: UIImageView!
func showMailComposer() {
guard MFMailComposeViewController.canSendMail() else {
return
}
let composer = MFMailComposeViewController()
composer.mailComposeDelegate = self
composer.setToRecipients(["LJDNSGKJNDGJ"])
composer.setSubject("JSABFKASJ")
composer.setMessageBody("hbdfnjbqeashfbnwdlskm", isHTML: false)
//I would like to know how to connect the "@IBOutlet var imageView: UIImageView!" to the composer. here ? and this would then present the image in the email.
)
present(composer, animated: true)