//
// ViewController.swift
// WebViewMission
//
// Created by seohuibaek on 2022/10/06.
//
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 filePath = Bundle.main.path(forResource: "htmlView", ofType: "html")
let myURL = URL(fileURLWithPath: filePath!)
let myRequest = URLRequest(url: myURL)
myWebView.load(myRequest)
}
}
html 코드
<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>
1) 코드 무난히 작성
2) 추가 구현 기능으로 뭐가 좋을지 고민해내지 못함 -> 구현하라는 기능만 정직하게 구현