Skip to content

Instantly share code, notes, and snippets.

@AdamSwinden
Last active February 10, 2016 17:59
Show Gist options
  • Save AdamSwinden/7bc3c322e13a2c7d014c to your computer and use it in GitHub Desktop.
Save AdamSwinden/7bc3c322e13a2c7d014c to your computer and use it in GitHub Desktop.
Workaround for SFSafariViewController quick swipe bug. (https://openradar.appspot.com/23871289)
let viewController = SFSafariViewController(URL: url)
presentViewController(viewController, animated: true) {
for view in viewController.view.subviews {
if let recognisers = view.gestureRecognizers {
for gestureRecogniser in recognisers where gestureRecogniser is UIScreenEdgePanGestureRecognizer {
gestureRecogniser.enabled = false
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment