Created
November 3, 2016 06:31
-
-
Save rinsuki/f871af650fd7ca6aabf8a8908809fca0 to your computer and use it in GitHub Desktop.
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
import objc_util | |
SFSafariViewController = objc_util.ObjCClass('SFSafariViewController') | |
safari = SFSafariViewController.alloc().initWithURL_(objc_util.nsurl('http://www.google.com')) | |
root_vc = objc_util.ObjCClass('UIApplication').sharedApplication().keyWindow().rootViewController() | |
while root_vc.presentedViewController(): | |
root_vc = root_vc.presentedViewController() | |
root_vc.presentViewController_animated_completion_(safari,False,None) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment