如何在UIActivityController中共享HTML内容?

时间:2017-06-01 07:54:18

标签: html ios swift uiactivityviewcontroller

我试过这个示例代码:

let websiteURL = "https://www.w3schools.com"
        let htmlText = "<html><a href=\(websiteURL)>" +
        "<img border="+"0"+" src= \(websiteURL)" + " width=100" + " height=100>"
        + "</a></html>"

testOBJ = NSArray(objects: SHARING_TEXT,htmlText)

let activityViewController = UIActivityViewController(activityItems: testOBJ as! [AnyObject], applicationActivities: nil)
presentViewController(activityViewController, animated: true, completion: nil)

它无法正常显示文字,因为它在Facebook上

click here to see result on facebook

0 个答案:

没有答案