UIActivityViewController选择短信:如何添加/显示取消按钮?

时间:2016-07-21 09:37:50

标签: ios swift sms uiactivityviewcontroller cancel-button

@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时。

感谢您的帮助

enter image description here

0 个答案:

没有答案