Basic drop-in WKWevView-based UIView. ABWebview
contains a small UIProgressView
which utilizes KVO to monitor WKWebView
to update the progress of the page load as well as the page's title.
-
Drag a
UIView
onto the storyboard, set the class toABWebView
in the Inspector. -
Control+Drag an
IBOutlet
onto theUIViewController
.@IBOutlet var webView: ABWebView!
-
To navigate to a page, feed
webView
an URL as aString
, like so:webView.url = "https://www.cnn.com"
Be sure to add the appropriate entries in your info.plist
file to allow http
requests.
Swiping left goes back, swiping right goes forward.