250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 애니메이션
- javascript
- image
- 개발자
- xcode
- 자바스크립트
- react
- ipad
- button
- 백엔드
- front-end
- php
- 비전공 개발자
- iPhone
- MAC
- 프론트엔드
- effect
- html5
- CSS
- 풀스택
- IOS
- Animation
- 비전공자
- hover
- SWIFT
- jQuery
- keyframes
- HTML
- css3
- iOS 개발자
Archives
- Today
- Total
비전공자 개발일기
WKWebView Phone Call 본문
728x90
SMALL
...
// HTML
<a href="tel:1544-7788">전화</a>
...
...
// 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: [:], completionHandler: nil)
}
decisionHandler(.cancel)
return
}
}
decisionHandler(.allow)
return
}
}
...
728x90
LIST
'SWIFT' 카테고리의 다른 글
Swift Image Upload to Server(PHP) (0) | 2023.03.03 |
---|---|
UIImagePickerControllerDelegate, UINavigationControllerDelegate (0) | 2023.03.02 |
WKWebView Component 1(Alert Event, go Back, go Forward) (0) | 2023.02.27 |
Device ID(UUID) (0) | 2023.02.26 |
Location Information in Background Mode(iOS - Swift) (0) | 2023.02.24 |