如何在Whatsapp上共享文本和图像

时间:2016-08-17 09:32:58

标签: ios swift share

我想和swift一起分享图片和文字。我该怎么做?

let url = NSURL(string: "whatsapp://app")
        let shareText = "Beni Bons'da ekle : \(PFUser.currentUser()!.username!). http://apple.co/29RMfNn"
        let bonsCardImage = UIImage.renderUIViewToImage(bonsCardView)
        let activityItems = [bonsCardImage]
        let vc = UIActivityViewController(activityItems: activityItems, applicationActivities: nil)
        presentViewController(vc, animated: true, completion: nil)

由于

0 个答案:

没有答案