Home Share image and text to whatsapp in single share in swift 4
Reply: 0

Share image and text to whatsapp in single share in swift 4

user765
1#
user765 Published in May 23, 2018, 6:54 pm

Could anyone suggest me how to share image with text to whatsaap or any alternative for the same.I have tried it using UIActivityViewController but its possible to share image+text simultaneously on mail bt not on whatsaap . Help will be appreciated. Thank you :)

code is as follows:

let textToShare = "Hello world"

let myWebsite = NSURL(string:"https://www.apple.com/")

        let img = UIImage(named:"BookImg")

        let shareall = [img!,textToShare,myWebsite!] as [Any]

        let vc = UIActivityViewController(activityItems: shareall, applicationActivities: nil)

       vc.popoverPresentationController?.sourceView = self.view

        self.present(vc, animated: true, completion: nil)
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.415271 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO