Created
May 9, 2016 13:30
-
-
Save ldenoue/b234b3872117341964fd7f568e16e658 to your computer and use it in GitHub Desktop.
openURL from Action Extension in iOS without using [UIApplication sharedApplication]
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
UIResponder *responder = self; | |
while(responder){ | |
if ([responder respondsToSelector: @selector(OpenURL:)]){ | |
[responder performSelector: @selector(OpenURL:) withObject: [NSURL URLWithString:url]]; | |
} | |
responder = [responder nextResponder]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would
NSClassFromString
+performSelector:withObject:
not do the trick?And if not that there's always
objc_msgSend