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