Created
December 8, 2018 16:31
-
-
Save flexaddicted/a061f65832c3fd2f1af39447e18f3269 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class ConsumerViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let webViewBox = createWebView(usingModern: true) | |
// add webView to the view hierachy | |
webViewBox.load(urlRequest: URLRequest(url: URL(string: "www.google.it")!)) | |
} | |
private func createWebView(usingModern: Bool) -> WebViewBox { | |
if usingModern { | |
return WebViewBox(view: ModernWebView()) | |
} | |
return WebViewBox(view: LegacyWebView()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment