-
-
Save dlpigpen/49ce68cb435c93530305 to your computer and use it in GitHub Desktop.
iOS - openURL from Custom Keyboard Extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func openURL(url: String) { | |
var responder: UIResponder = self | |
while responder.nextResponder() != nil { | |
responder = responder.nextResponder()! | |
NSLog("responder = %@", responder) | |
if responder.respondsToSelector("openURL:") == true { | |
responder.performSelector("openURL:", withObject: NSURL(string: url)) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put it into the action button or something like that.