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
- Animation
- php
- MAC
- 풀스택
- effect
- keyframes
- 개발자
- react
- html5
- jQuery
- 비전공자
- IOS
- ipad
- 프론트엔드
- 백엔드
- 애니메이션
- iOS 개발자
- image
- iPhone
- 비전공 개발자
- xcode
- hover
- button
- CSS
- HTML
- 자바스크립트
- front-end
- SWIFT
- css3
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 |