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