0
我有一個非常快速的初學者問題:我怎樣才能讓這個功能共享一個URL呢?我總是遵循一切,並認爲我是對的,但它似乎不工作......非常感謝!分享網址連同截圖和文字
func takeSnapshot(view: UIView) {
let bounds = UIScreen.mainScreen().bounds
UIGraphicsBeginImageContextWithOptions(bounds.size, true, 0.0)
self.view.drawViewHierarchyInRect(bounds, afterScreenUpdates: false)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
let text = "Text to be shared... #Hashtag"
let activityViewController = UIActivityViewController(activityItems: [image, text], applicationActivities: nil)
self.presentViewController(activityViewController, animated: true, completion: nil)
我剛開始一個小細節錯了...謝謝你這麼多! –