One of the many advantages of
UIWebView is its ability to draw on some of the native user interface of Safari. It's a long way from the
SFSafariViewController that was introduced in iOS 9.0, but you can enable the built-in gestures that let users go back and forward by swiping left and right.
Here's the code:
webView.allowsBackForwardNavigationGestures = true
Available from iOS 8.0 – see Hacking with Swift tutorial 4
Did this solution work for you? Please pass it on!
Other people are reading…
About the Swift Knowledge Base
This is part of the Swift Knowledge Base, a free, searchable collection of solutions for common iOS questions.
Swift on the server is here
Get ahead of the game and learn server-side Swift with my latest book – build real-world projects while you learn!