Hi,
I have installed Swift Playgrounds on my iPad and I would like to create an app that displays a webpage (html).
I tried several code found on the web, like this below, but does not work.
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)
}}
Is it possible to create an app on Swift Playgrounds for iPad that lauch a html page in a webView ?
Thanks for your help.
5
0
2.5k