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