@IBAction func shareButtonClicked(sender: UIButton) {
let textToShare = "Swift is awesome! Check out this website about it!"
if let myWebsite = NSURL(string: "http://www.codingexplorer.com/") {
let objectsToShare = [textToShare, myWebsite]
let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
activityVC.popoverPresentationController?.sourceView = sender
self.presentViewController(activityVC, animated: true, completion: nil)
}
}
嗨,我将短信分享添加到我的应用程序,一切正常,但我希望能够在我启动后取消短信。 没有取消按钮显示在用于短信的uinavigationbar中,当它存在于Mail,Twitter或Facebook时。
感谢您的帮助