5 Replies
      Latest reply on Jan 24, 2020 9:33 PM by PBK
      george1984 Level 1 Level 1 (0 points)

        Could someone convert this to objective c

        Thanks!

         

        https://developer.apple.com/documentation/webkit/wkwebview?language=objc

         

        Creating a WKWebView programmatically

         

        import UIKit
        import WebKit
        class ViewController: UIViewController, WKUIDelegate {
          
          var webView: WKWebView!
          
          override func loadView() {
          let webConfiguration = WKWebViewConfiguration()
          webView = WKWebView(frame: .zero, configuration: webConfiguration)
          webView.uiDelegate = self
          view = webView
          }
          override func viewDidLoad() {
          super.viewDidLoad()
          
          let myURL = URL(string:"https://www.apple.com")
          let myRequest = URLRequest(url: myURL!)
          webView.load(myRequest)
          }}