일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 프론트엔드
- CSS
- iOS 개발자
- HTML
- html5
- hover
- 비전공자
- IOS
- keyframes
- image
- SWIFT
- button
- react
- php
- effect
- css3
- jQuery
- ipad
- 애니메이션
- javascript
- front-end
- 백엔드
- iPhone
- 개발자
- Animation
- 풀스택
- 비전공 개발자
- xcode
- MAC
- 자바스크립트
- Today
- Total
목록wkwebview (6)
비전공자 개발일기

문제 상황 Swift WKWebView를 활용하여 앱을 제작하고 있고, Web Page의 Script나 Tag를 확인하기 위해서 Safari의 개발자용 -> 연결된 기기를 통해서 Web Page를 Debugging 하는 과정에서 문제 발견 해결 방법 if #available(iOS 16.4, *) { myWebView.isInspectable = true } https://developer.apple.com/documentation/webkit/wkwebview/4111163-isinspectable isInspectable | Apple Developer Documentation There's never been a better time to develop for Apple platforms. deve..
var isScrolling = false ... let preferences = WKPreferences() preferences.javaScriptCanOpenWindowsAutomatically = true ... let contentController = WKUserContentController() ... let configuration = WKWebViewConfiguration() configuration.preferences = preferences configuration.userContentController = contentController ... webView = WKWebView(frame: self.view.bounds, configuration: configuration) ...

1. Xcode에서 Simulator 또는 USB로 연결한 실제기기를 Cmd + R(빌드) 2. Safari Open 후 개발자용 메뉴 선택 개발자용 메뉴가 없을 경우 1. Mac Safari Setting 2. iPhone Safari Setting 3. 해당 웹페에지 클릭 4. 웹 속성 확인
let url = "your URL" var components = URLComponents(string: url)! components.queryItems = URLQueryItem(name: "name", value: value.trimmingCharacters(in: .whitespaces)) components.queryItems = [URLQueryItem(name: "name1", value: value.trimmingCharacters(in: .whitespaces)), URLQueryItem(name: "name2", value: value.trimmingCharacters(in: .whitespaces))] var request = URLRequest(url: components.url!..
webView.scrollView.refreshControl = UIRefreshControl() webView.scrollView.refreshControl?.addTarget(self, action: #selector(handleRefreshControl), for: .valueChanged) webView.scrollView.refreshControl?.tintColor = UIColor(red: 187 / 255, green: 38 / 255, blue: 73 / 255, alpha: 1.0) webView.scrollView.refreshControl?.attributedTitle = NSAttributedString(string: "당겨서 새로고침", attributes: [.foregroun..

... // HTML 전화 ... ... // Swift extension ViewController: WKNavigationDelegate { func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { if let url = navigationAction.request.url { if url.scheme == "tel" { if UIApplication.shared.canOpenURL(url) { UIApplication.shared.open(url, options: [:], complet..