IOS10 的共享活动列表为空
List of acitivies for sharing is empty with IOS10
我在与 SO iOS10 共享时遇到了一些问题。
我写这段代码是为了选择一个 activity 并分享一个 link
@IBAction func shareAction(_ sender: AnyObject) {
let objectsToShare = ["Shared by: xxxxxx**strong text**", url]
let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
//New Excluded Activities Code
activityVC.excludedActivityTypes = [UIActivityType.airDrop, UIActivityType.addToReadingList]
if UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.phone {
self.present(activityVC, animated: true, completion: nil)
}else {
let popup: UIPopoverController = UIPopoverController(contentViewController: activityVC)
popup.present(from: CGRect(x: self.view.frame.size.width / 2, y: self.view.frame.size.height / 4, width: 0, height: 0), in: self.view, permittedArrowDirections: UIPopoverArrowDirection.any, animated: true)
}
}
之前的版本新开了一个viewcontroller可以选择activity用来分享,现在看到这个
No activity is shown
没有人有这个问题吗?
感谢大家...
很奇怪....问题自动解决了。
现在一切正常,没有任何补丁
我的 iPhone 更新到 iOS 10.0.2,也许这个版本解决了问题
我在与 SO iOS10 共享时遇到了一些问题。 我写这段代码是为了选择一个 activity 并分享一个 link
@IBAction func shareAction(_ sender: AnyObject) {
let objectsToShare = ["Shared by: xxxxxx**strong text**", url]
let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
//New Excluded Activities Code
activityVC.excludedActivityTypes = [UIActivityType.airDrop, UIActivityType.addToReadingList]
if UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.phone {
self.present(activityVC, animated: true, completion: nil)
}else {
let popup: UIPopoverController = UIPopoverController(contentViewController: activityVC)
popup.present(from: CGRect(x: self.view.frame.size.width / 2, y: self.view.frame.size.height / 4, width: 0, height: 0), in: self.view, permittedArrowDirections: UIPopoverArrowDirection.any, animated: true)
}
}
之前的版本新开了一个viewcontroller可以选择activity用来分享,现在看到这个
No activity is shown
没有人有这个问题吗?
感谢大家...
很奇怪....问题自动解决了。 现在一切正常,没有任何补丁 我的 iPhone 更新到 iOS 10.0.2,也许这个版本解决了问题