Latest 1.0.3
Homepage https://github.com/czqasngit/RefreshKit
License MIT
Platforms ios 9.0
Dependencies BerryPlant
Authors

RefreshKit

Version
License
Platform

refreshkit

Introduce

A refresh kit for UIScrollView written by Swif
Pull-up pull-down kit
Simple to use and extend

Feature

1.Default Header and Footer.

2.Animate Header(Gif, APNG).

3.Fast loading Footer refresh.

Extension

1.Lottie

2.Custom Header and Footer

Example

More function please open Example/RefreshKit.xcworkspace

1.Default Header and Footer

self.tableView.refresh.header = RefreshDefaultHeader.make {
            DispatchQueue.main.asyncAfter(deadline: .now() + 1.5, execute: {
                self.count = 10
                self.tableView.reloadData()
                self.tableView.refresh.header?.stopRefresh()
                self.tableView.refresh.footer?.resetNoMoreData()
            })
        }
        self.tableView.refresh.footer = RefreshDefaultFooter.make {
            if self.count >= 20 {
                DispatchQueue.main.asyncAfter(deadline: .now() + 1.5, execute: {
                    self.tableView.reloadData()
                    self.tableView.refresh.footer?.noMoreData()
                })
            } else {
                DispatchQueue.main.asyncAfter(deadline: .now() + 1.5, execute: {
                    self.count += 10
                    print("..............")
                    self.tableView.reloadData()
                    self.tableView.refresh.footer?.stopRefresh()
                })
            }
        }

2.Animate Header

self.tableView.refresh.header = RefreshAnimateHeader.make(path) {
            DispatchQueue.main.asyncAfter(deadline: .now() + 1.5, execute: {
                self.count = 10
                self.tableView.reloadData()
                self.tableView.refresh.header?.stopRefresh()
                self.tableView.refresh.footer?.resetNoMoreData()
            })
        }

3. Fast Loading Footer

self.tableView.refresh.footer = RefreshFastFooter.makeFastFooter {
            if self.count >= 200 {
                DispatchQueue.main.asyncAfter(deadline: .now() + 0.2, execute: {
                    self.tableView.reloadData()
                    self.tableView.refresh.footer?.noMoreData()
                })
            } else {
                DispatchQueue.main.asyncAfter(deadline: .now() + 0.2, execute: {
                    self.count += 10
                    self.tableView.reloadData()
                    self.tableView.refresh.footer?.stopRefresh()
                })
            }
        }

Requirements

Installation

RefreshKit is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'RefreshKit'

Author

czqasngit, [email protected]

License

RefreshKit is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "SwiftRefreshKit",
    "version": "1.0.3",
    "summary": "A refresh kit for UIScrollView written by Swift.",
    "description": "Pull-up pull-down kitnSimple to use and extend",
    "homepage": "https://github.com/czqasngit/RefreshKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "czqasngit": "[email protected]"
    },
    "source": {
        "git": "https://github.com/czqasngit/RefreshKit.git",
        "tag": "1.0.3"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "RefreshKit/Classes/**/*",
    "resource_bundles": {
        "RefreshKit": [
            "RefreshKit/Assets/*.png"
        ]
    },
    "swift_version": "4.0",
    "dependencies": {
        "BerryPlant": []
    }
}

Pin It on Pinterest

Share This