Do it! 스위프트로 아이폰 앱 만들기
07장 도전! Mission 웹 앱 만들기
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<h1> WorkFlowy </h1>
workflowy 앱처럼 보이는지 확인해 봅시다<br>
<p><a href="https://workflowy.com">https://workflowy.com</a>로 이동</p>
</body>
</html>
import UIKit
import WebKit
class ViewController: UIViewController {
@IBOutlet var myWebView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
let htmlPath = Bundle.main.path(forResource: "htmlView", ofType: "html")
let myUrl = URL(fileURLWithPath: htmlPath!)
let myRequest = URLRequest(url: myUrl)
myWebView.load(myRequest)
}
}