我的应用程序中有一个共享功能,它调用带有文本,网址和图像的uiactivityviewcontroller来共享。
网址和图片工作正常,但文字没有显示..
以下是我正在使用的代码:
var highscore:Int = NSUserDefaults.standardUserDefaults().integerForKey("highscore")
var text = "My favourite game: 'Zig Zag!' My highscore: \(highscore)"
let link = NSURL(string: "https://itunes.apple.com/us/app/go-down!/id101725307?l=nl&ls=1&mt=8")
let actviewcon = UIActivityViewController(activityItems: [text,link!,shareima!], applicationActivities: nil)
actviewcon.excludedActivityTypes = [
UIActivityTypePrint,
UIActivityTypeCopyToPasteboard,
UIActivityTypeAssignToContact,
UIActivityTypeSaveToCameraRoll,
UIActivityTypeAddToReadingList,
]
actviewcon.completionWithItemsHandler = {
(activity, success, items, error) in
//println("Activity: \(activity) Success: \(success) Items: \(items) Error: \(error)")
}
self.presentViewController(actviewcon, animated: true, completion: nil)
}