Last active
October 29, 2015 06:42
-
-
Save speaktoalvin/b8a039ca6b484061546a to your computer and use it in GitHub Desktop.
This file contains 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
// Adding Screen Edge Pan to the presenting viewController | |
@IBAction func showSafariViewController(sender: AnyObject) { | |
let safariViewController = IDMSafariViewController(URL: NSURL(string: "http://idreamcode.com")!) | |
safariViewController.delegate = self; | |
safariViewController.transitioningDelegate = self.transitionManager | |
safariViewController.modalPresentationStyle = UIModalPresentationStyle.Custom | |
self.transitionManager.transitionTo = kToManageReourceVC | |
self.presentViewController(safariViewController, animated: true) { () -> Void in | |
let recognizer = UIScreenEdgePanGestureRecognizer(target: self, action: "handleGesture:") | |
recognizer.edges = UIRectEdge.Left | |
safariViewController.edgeView?.addGestureRecognizer(recognizer) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment