Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Antondomashnev/ADChromePullToRefresh
ADChromePullToRefresh
https://github.com/Antondomashnev/ADChromePullToRefresh
cocoapods pull-to-refresh refresh-actions
Last synced: about 1 month ago
JSON representation
ADChromePullToRefresh
- Host: GitHub
- URL: https://github.com/Antondomashnev/ADChromePullToRefresh
- Owner: Antondomashnev
- License: mit
- Created: 2015-05-10T16:31:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-17T00:01:58.000Z (about 6 years ago)
- Last Synced: 2024-11-24T19:43:50.372Z (about 2 months ago)
- Topics: cocoapods, pull-to-refresh, refresh-actions
- Language: Swift
- Size: 50.8 KB
- Stars: 266
- Watchers: 12
- Forks: 18
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - ADChromePullToRefresh - Chrome iOS app style pull to refresh with multiple actions. (UI / Pull to Refresh)
- awesome-ios-star - ADChromePullToRefresh - Chrome iOS app style pull to refresh with multiple actions. (UI / Pull to Refresh)
README
# ADChromePullToRefresh
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/ADChromePullToRefresh.svg)](https://img.shields.io/cocoapods/v/ADChromePullToRefresh.svg)
Yet another custom pull to refresh for your needs.
Inspired by Google Chrome iOS app
## Easy to use
You can simply setup your own chrome style pull to refresh using the initializer below
```swift
/*
* To initialize ADChromePullToRefresh use this designated initializer
* @param view - view to overlay by pull to refresh
* @param scrollView - for which scrollView we add pull to refresh
* @param scrollViewOriginalOffsetY - initial offset y of the given scrollView
* @param delegate - object conformed to ADChromePullToRefreshDelegate protocol
*/
init(view: UIView, forScrollView scrollView: UIScrollView, scrollViewOriginalOffsetY: CGFloat, delegate: ADChromePullToRefreshDelegate)
```To provide custom handler for pull to refresh actions you need to implement this delegate methos in your class
```swift
/*
* Use this function to provide an action for the given action view type
*/
func chromePullToRefresh(_ pullToRefresh: ADChromePullToRefresh, actionForViewWithType: ADChromePullToRefreshActionViewType) -> ADChromePullToRefreshAction?
```You're able to customize pull to refresh action view according to your needs 🚀
```swift
/*
* Use this function to create view with icon for the given pullToRefresh. To customize view use subclass of
* ADChromePullToRefreshActionView
* @see ADChromePullToRefreshActionView.swift
* @see UITableViewDelegate - similar method to get header and footer view
*/
func chromePullToRefresh(_ pullToRefresh: ADChromePullToRefresh, viewWithType: ADChromePullToRefreshActionViewType) -> ADChromePullToRefreshActionView
```## Easy to install
### CocoaPods
To integrate ADPuzzleAnimation into your Xcode project using CocoaPods, specify it in your `Podfile`:
```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!pod 'ADChromePullToRefresh', '~> 0.5'