Created
December 4, 2019 18:03
-
-
Save ronaldozanoni/92e0bd77a1f46915898b37c1d495b641 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 WebViewController: UIViewController, WKNavigationDelegate { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let webView = WKWebView() | |
webView.translatesAutoresizingMaskIntoConstraints = false | |
//webView.delegate = self | |
view.addSubview(webView) | |
NSLayoutConstraint.activate([ | |
webView.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 0.0), | |
webView.topAnchor.constraint(equalTo: view.topAnchor, constant: 0.0), | |
webView.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: 0.0), | |
webView.rightAnchor.constraint(equalTo: view.rightAnchor, constant: 0.0) | |
]) | |
let url = URL(string: "https://menus-demo.preoday.com/ronaldos-cafe?checkoutToken=73-Ht4AZVsBuimKr,EJ-kvl6EruTuN-690tb4ppyCBYDmiwLun-eMlX2JpcJrgNpb8GUGJNTn7M8KvnqSwGVTuTnJprQfSZcm0t289XtzVJVfdxi20mCL5GhC5kbOE56NcXEqJe0zrkKa9OCZXxGY0o,,yr1ZMD3OipqE-CPeNzgJQ09ZIjeoZFHiE25xoHZ0WAJMCrM2IL7yeFMoUnTxU-P2EnyJvm1dcObIlZt2O9P4Znzc1ilEbsCd5r1RHGrGRXVO,1mciGD4Ouc3mL1mO9OvuckHs113BSF-aI5Qh4%3D&redirectURL=http://localhost:8282/&checkoutOnly=true")! | |
webView.load(URLRequest(url: url)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment