All Projects → WXGBridgeQ → Swiftpulltorefresh

WXGBridgeQ / Swiftpulltorefresh

Licence: mit
An easy way to implement pull-to-refresh feature based on UIScrollView extension, written in Swift 4.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swiftpulltorefresh

XSPullRefresh
下拉刷新日蚀效果 eclipse
Stars: ✭ 24 (-94.68%)
Mutual labels:  pull-to-refresh
GeneralRecyclerViewFragment
Can automatically pull down the refresh, pull up the page of RecyclerviewFragment(能够自动下拉刷新,上拉翻页的RecyclerviewFragment)
Stars: ✭ 56 (-87.58%)
Mutual labels:  pull-to-refresh
Brv
Android上最强大的RecyclerView库
Stars: ✭ 345 (-23.5%)
Mutual labels:  pull-to-refresh
SJLineRefresh
pull-to-refresh by line path
Stars: ✭ 36 (-92.02%)
Mutual labels:  pull-to-refresh
SwiftFCXRefresh
Pull to refresh in Swift.
Stars: ✭ 29 (-93.57%)
Mutual labels:  pull-to-refresh
MagiRefresh
swift版下拉刷新,支持多种样式,同时支持,加载动画,网络错误占位(有兴趣学习如何用swift使用runtime的可以看看)
Stars: ✭ 25 (-94.46%)
Mutual labels:  pull-to-refresh
smart-react-native-app
React Native 下拉刷新, 分页加载, 侧边栏, Tab导航学习(Android Studio, ES6语法)
Stars: ✭ 56 (-87.58%)
Mutual labels:  pull-to-refresh
Scrollload
scroll bottom load more data pull refresh 滚动到底部加载更多数据 下拉刷新
Stars: ✭ 411 (-8.87%)
Mutual labels:  pull-to-refresh
flutter examples
Random flutter examples
Stars: ✭ 18 (-96.01%)
Mutual labels:  pull-to-refresh
Adchromepulltorefresh
ADChromePullToRefresh
Stars: ✭ 263 (-41.69%)
Mutual labels:  pull-to-refresh
ParticlesRefreshLayout-android
Particles Refresh Layout library for Android
Stars: ✭ 15 (-96.67%)
Mutual labels:  pull-to-refresh
LiteRefresh
Nested scrolling UI library for Android based on CoordinatorLayout. Pull-to-refresh and pull-to-load-more are supported.
Stars: ✭ 37 (-91.8%)
Mutual labels:  pull-to-refresh
Refreshable
🌀Pull to refresh and load more function for UIScrollView
Stars: ✭ 31 (-93.13%)
Mutual labels:  pull-to-refresh
vue-data-loading
Another component for infinite scroll and pull down/up to load data.
Stars: ✭ 63 (-86.03%)
Mutual labels:  pull-to-refresh
React Pull To Refresh
React component for web pull to refresh
Stars: ✭ 390 (-13.53%)
Mutual labels:  pull-to-refresh
Scroller
React版iScroll并且集成下拉刷新,上拉加载更多,Sticky等功能
Stars: ✭ 52 (-88.47%)
Mutual labels:  pull-to-refresh
LottieSwipeRefreshLayout
Pull to refresh layout that shows a Lottie View.
Stars: ✭ 50 (-88.91%)
Mutual labels:  pull-to-refresh
Phoenix
Phoenix Pull-to-Refresh
Stars: ✭ 4,048 (+797.56%)
Mutual labels:  pull-to-refresh
Pull To Reload
Pull to reload implementation for the web. Designed to work with both mobile and websites.
Stars: ✭ 396 (-12.2%)
Mutual labels:  pull-to-refresh
angular-material-swipe-to-refresh
Swipe to refresh (pull to refresh) for Angular Material
Stars: ✭ 15 (-96.67%)
Mutual labels:  pull-to-refresh

Logo

Build Status Carthage compatible CocoaPods Compatible Platform Language License codebeat badge

SwiftPullToRefresh

An easy way to implement pull-to-refresh feature based on UIScrollView extension, written in Swift 4.

Provide default style header and footer controls which you can directly use in your project, and also support for customization. GIF is also supported.

Example usage

Indicator Header

scrollView.spr_setIndicatorHeader { [weak self] in
    // do your action here
    // self?.scrollView.spr_endRefreshing()
}

Text Header

scrollView.spr_setTextHeader { [weak self] in
    // do your action here
    // self?.scrollView.spr_endRefreshing()
}

Small GIF Header

scrollView.spr_setGIFHeader(data: data, isBig: false, height: 60) { [weak self] in
    // do your action here
    // self?.scrollView.spr_endRefreshing()
}

GIF + Text Header

scrollView.spr_setGIFTextHeader(data: data) { [weak self] in
    // do your action here
    // self?.scrollView.spr_endRefreshing()
}

Big GIF Header

scrollView.spr_setGIFHeader(data: data, isBig: true, height: 120) { [weak self] in
    // do your action here
    // self?.scrollView.spr_endRefreshing()
}

Indicator Footer

scrollView.spr_setIndicatorFooter { [weak self] in
    // do your action here
    // self?.scrollView.spr_endRefreshing()
}

or

scrollView.spr_setIndicatorAutoFooter { [weak self] in
    // do your action here
    // self?.scrollView.spr_endRefreshing()
}

Text Footer

scrollView.spr_setTextFooter { [weak self] in
    // do your action here
    // self?.scrollView.spr_endRefreshing()
}

or

scrollView.spr_setTextAutoFooter { [weak self] in
    // do your action here
    // self?.scrollView.spr_endRefreshing()
}

Clear header or footer

scrollView.spr_clearHeader()
scrollView.spr_clearFooter()

Demo

Open and run the SwiftPullToRefreshDemo target in Xcode to see SwiftPullToRefresh in more actions.

Requirements

  • iOS 8.0
  • Swift 4.0

Installation

CocoaPods

use_frameworks!
pod 'SwiftPullToRefresh'

Carthage

github "WXGBridgeQ/SwiftPullToRefresh"

Manual

Add SwiftPullToRefresh folder into your project.

Customization

The framework is very easy to customize the use.

You just need to subclass the RefreshView and implement the methods below, then call spr_setCustomHeader(_:) or spr_setCustomFooter(_:) with your scrollView.

class CustomHeaderOrFooter: RefreshView {
    override func didUpdateState(_ isRefreshing: Bool) {
        // customize your view display with refresh state here
    }
    
    override func didUpdateProgress(_ progress: CGFloat) {
        // customize your view display with progress here
    }
}

You can also check the code of the super cat refresh which is a custom header in the SwiftPullToRefreshDemo target (Inspired by RayWenderlich)

Contribution

You are welcome to contribute to the project by forking the repo, modifying the code and opening issues or pull requests.

License

Available under MIT license. See the LICENSE for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].