【问题标题】:List of acitivies for sharing is empty with IOS10IOS10共享活动列表为空
【发布时间】:2016-09-24 11:16:29
【问题描述】:

我在与 SO iOS10 共享时遇到了一些问题。 我写了这段代码来选择一个活动并分享一个链接

@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)
    }
}

在以前的版本中,打开了一个新的视图控制器来选择要共享的活动,但现在我看到了这个

No activity is shown 没人有这个问题吗?
谢谢大家...

【问题讨论】:

    标签: ios share swift3 ios10 uiactivityviewcontroller


    【解决方案1】:

    很奇怪....问题自动解决了。 现在一切正常,无需任何补丁 我的 iPhone 更新到 iOS 10.0.2,也许这个版本解决了问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-29
      • 1970-01-01
      相关资源
      最近更新 更多