金辰股份代码:是否在股份表上识别选择(share sheet iphone)

关于金辰股份代码的问题,在share sheet iphone中经常遇到, 我正在使用 share sheet 打开一些本地应用程序-即邮件,提醒,笔记,消息。下面是我的代码在单击共享按钮后打开共享表。

我正在使用 share sheet 打开一些本地应用程序-即邮件,提醒,笔记,消息。是我的代码在单击共享按钮后打开共享表。

我正在寻找一种方法来识别用户点击共享表,即当用户选择共享表上的选项时调用的 API。我搜索并找不到任何东西,所以不确定是否有一种方法来识别用户选择?

func presentShareSheet(content: String, subject: String = "", shareButton: UIView? = nil, presentingVC: UIViewController? = nil) -> Guarantee<Void> {
    return Guarantee { seal in
        let itemsToShare: [Any] = [someItems]
        let activityViewController = UIActivityViewController(activityItems: itemsToShare, applicationActivities: nil)
 
        activityViewController.popoverPresentationController?.sourceView = shareButton
        activityViewController.completionWithItemsHandler = { activityType, completed, items, error in
            // update color of navigation bar
            seal(())
        }
        
        if let vc = presentingVC ?? UIApplication.shared.topMostViewController() {
            vc.present(activityViewController, animated: true)
        } else {
            seal(())
        }
    }
}

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(475)
夜神android模拟器:Firebase模拟器功能和 Android模拟器
上一篇
破产申请程序:申请转账(apps to transfer money)
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(72条)