Skip to content

Instantly share code, notes, and snippets.

@flexaddicted
Last active December 8, 2018 16:25
Show Gist options
  • Save flexaddicted/88a019f9db0128c1e5e7cce9edfe1325 to your computer and use it in GitHub Desktop.
Save flexaddicted/88a019f9db0128c1e5e7cce9edfe1325 to your computer and use it in GitHub Desktop.
class LegacyWebView: UIView, URLRequestable {
private var webView: UIWebView!
func load(urlRequest: URLRequest) {
webView.loadRequest(urlRequest)
}
// other code here
}
class ModernWebView: UIView, URLRequestable {
private var webView: WKWebView!
func load(urlRequest: URLRequest) {
webView.load(urlRequest)
}
// other code here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment