Tag: uiactivityviewcontroller ios8扩展

如何在我的Swift ActivityViewController中包含一个Objective-C扩展?

我已经在我的浏览器应用程序中包含了1Password扩展名。 但是,我已经在我的应用程序上安装了iOS 8 Share Sheet(ActivityViewController),并且希望在使用它自己的分享表内包含1Password。 我的应用程序是在Swift中,但1Password在Objective-C中。 以下是我用于ActivityViewController的代码: @IBAction func _shareButton(sender: UIButton) { var shareContent = _searchBar.text if let myWebsite = NSURL(string: "\(_searchBar.text)") { let objectsToShare = [myWebsite] let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil) if UIDevice.currentDevice().userInterfaceIdiom == .Pad { // The app is running on an iPad, so you have to wrap it in a […]