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
- css3
- image
- button
- keyframes
- 비전공자
- xcode
- iOS 개발자
- php
- 자바스크립트
- 프론트엔드
- 백엔드
- javascript
- react
- jQuery
- effect
- 개발자
- IOS
- 비전공 개발자
- iPhone
- ipad
- HTML
- html5
- MAC
- hover
- SWIFT
- 애니메이션
- Animation
- 풀스택
- front-end
- CSS
Archives
- Today
- Total
비전공자 개발일기
WKWebView Reload Code 본문
728x90
SMALL
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: [.foregroundColor: UIColor(red: 187 / 255, green: 38 / 255, blue: 73 / 255, alpha: 1.0)])
...
@objc func handleRefreshControl() {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) {
self.webView.reload()
self.webView.scrollView.refreshControl?.endRefreshing()
}
}
...
728x90
LIST
'SWIFT' 카테고리의 다른 글
WKWebView URL Query & Header Setting (0) | 2023.03.07 |
---|---|
SafeArea Color Control (0) | 2023.03.06 |
Swift Image Upload to Server(PHP) (0) | 2023.03.03 |
UIImagePickerControllerDelegate, UINavigationControllerDelegate (0) | 2023.03.02 |
WKWebView Phone Call (0) | 2023.03.01 |