Sharing a image from UIImageView
using UIActivityViewController
?
I am trying to share a image using UIActivityViewController
, but I get error:
func shareIMG(){
let activityItems = [self.imageView.image]
let avc = UIActivityViewController(activityItems: activityItems, applicationActivities: nil)
self.presentViewController(avc, animated: true, completion: nil)
}
Error message:
Cannot find an initializer for type 'UIActivityViewController' that accepts an argument list of type '(activityItems: [UIImage?], applicationActivities: nil)'
Any ideas?