PullToRefreshSwift alternatives and similar libraries
Based on the "Pull to Refresh" category.
Alternatively, view PullToRefreshSwift alternatives based on common mentions on social networks and blogs.
-
CBStoreHouseRefreshControl
Fully customizable pull-to-refresh control inspired by Storehouse iOS app -
ESPullToRefresh
#Busy Re-Building....# An easy way to use pull to refresh and infinite scrolling in Swift. Pod 'ESPullToRefresh' -
PullToBounce
Animated "Pull To Refresh" Library for UIScrollView. Inspired by https://dribbble.com/shots/1797373-Pull-Down-To-Refresh -
UzysAnimatedGifPullToRefresh
Add PullToRefresh using animated GIF to any scrollView with just simple code -
KafkaRefresh
Animated, customizable, and flexible pull-to-refresh framework for faster and easier iOS development. -
BOZPongRefreshControl
A pull-down-to-refresh control for iOS that plays pong, originally created for the MHacks III iOS app -
PullToRefreshCoreText
PullToRefresh extension for all UIScrollView type classes with animated text drawing style -
GIFRefreshControl
GIFRefreshControl is a pull to refresh that supports GIF images as track animations. -
HTPullToRefresh
Easily add vertical and horizontal pull to refresh to any UIScrollView. Can also add multiple pull-to-refesh views at once.
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of PullToRefreshSwift or a related project?
README
PullToRefreshSwift
iOS Simple PullToRefresh Library.
[sample](Screenshots/PullToRefreshSwift.gif)
Installation
CocoaPods
pod 'PullToRefreshSwift'
Manually
Add the following files to your project.
pulltorefresharrow.png
PullToRefreshView.swift
PullToRefreshConst.swift
UIScrollViewExtension.swift
Usage
Setup
In your UIViewController Including UITableView, UICollectionView, UIScrollView:
override func viewDidLoad() {
self.tableView.addPullToRefresh({ [weak self] in
// refresh code
self?.tableView.reloadData()
self?.tableView.stopPullToRefresh()
})
}
You can use PullToRefreshOption class at addPullToRefresh func option parameter:
override func viewDidLoad() {
let options = PullToRefreshOption()
options.backgroundColor = UIColor.blueColor()
options.indicatorColor = UIColor.whiteColor()
self.tableView.addPullToRefresh(options: options, { [weak self] in
// some code
self?.tableView.reloadData()
self?.tableView.stopPullToRefresh()
})
}
If you want to fixed pulltoRefreshView, please implement scrollViewDidScroll.
func scrollViewDidScroll(scrollView: UIScrollView) {
self.tableView.fixedPullToRefreshViewForDidScroll()
}
If you want to use the custom const, please change the PullToRefreshConst class.
struct PullToRefreshConst {
static let tag = 810
static let alpha = true
static let height: CGFloat = 80
static let imageName: String = "pulltorefresharrow.png"
static let animationDuration: Double = 0.4
static let fixedTop = true // PullToRefreshView fixed Top
}
If you want to use the custom option, please change the PullToRefreshOption class. You can use this class at addPullToRefresh func option parameter.
class PullToRefreshOption {
var backgroundColor = UIColor.clearColor()
var indicatorColor = UIColor.grayColor()
var autoStopTime: Double = 0.7 // 0 is not auto stop
var fixedSectionHeader = false // Update the content inset for fixed section headers
}
Requirements
Requires Swift3.0 and iOS 8.0 and ARC.
If you are developing in the Swift1.1 ~ 2.3, please use branch of Swift1.1 ~ Swift2.3.
Features
- Highly customizable
- Complete example
- Refactoring
Contributing
Forks, patches and other feedback are welcome.
Creator
License
PullToRefreshSwift is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the PullToRefreshSwift README section above
are relevant to that project's source code only.