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