일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- button
- front-end
- html5
- xcode
- javascript
- image
- 백엔드
- react
- MAC
- 애니메이션
- iPhone
- php
- IOS
- 개발자
- 프론트엔드
- iOS 개발자
- effect
- 풀스택
- keyframes
- 비전공자
- HTML
- 자바스크립트
- jQuery
- ipad
- hover
- css3
- Animation
- CSS
- SWIFT
- 비전공 개발자
- Today
- Total
목록wkwebview (6)
비전공자 개발일기
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/97yag/btr9rg60mb0/cD0HlMMZ3E8VqagZZKllQK/img.png)
문제 상황 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) ...
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/eauHYH/btr2PynDJ1d/4vlO5HKQRefzHj3sL24lLk/img.png)
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..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/5MjeY/btr1f1YyYf2/TWascFS1RSjmtp7H5UwFr0/img.jpg)
... // 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..