Skip to content

Instantly share code, notes, and snippets.

@m1entus
Last active October 5, 2017 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m1entus/0ef5c1d85a32a9b7bde8e12d67039aef to your computer and use it in GitHub Desktop.
Save m1entus/0ef5c1d85a32a9b7bde8e12d67039aef to your computer and use it in GitHub Desktop.
//...
let configuration = SocialServiceBrowserConfigurator(client: SocialServiceBrowserDropboxClient(), selectionMode: .select)
let viewController = SocialServiceBrowserViewController(configuration: configuration, uiConfiguration: configuration)
viewController.delegate = self
present(UINavigationController(rootViewController: viewController), animated: true, completion: nil)
//...
extension ViewController: SocialServiceBrowserViewControllerDelegate {
func socialServiceBrowser(_ socialServiceBrowser: SocialServiceBrowserViewController, didSelect node: SocialServiceBrowerNode) {
socialServiceBrowser.importNode(node) { [weak self] node, error in
if let node = node {
// Show UIDocumentInteractionController for node.fileURL
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment