Skip to content
No description, website, or topics provided.
Swift Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
KVRefreshable
.swift-version
KVRefreshable.podspec
LICENSE
README.md
_Pods.xcodeproj

README.md

KVRefreshable

[![CI Status](http://img.shields.io/travis/Vu Van Khac/KVRefreshable.svg?style=flat)](https://travis-ci.org/Vu Van Khac/KVRefreshable) Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 8.0+
  • Swift 5.0

Installation

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

# For Swift 5.0
pod 'KVRefreshable', '~> 2.0.3'

Usage

Adding pull to refresh

tableView.addPullToRefreshWithActionHandler {
    // Stop pull to refresh animation
    self.tableView.pullToRefreshView.stopAnimating()
}

Trigger the pull to refresh

tableView.triggerPullToRefresh()

Show the pull to refresh view

tableView.showsPullToRefresh = true

Hide the pull to refresh view

tableView.showsPullToRefresh = false

Adding infinite scrolling

tableView.addInfiniteScrollingWithActionHandler {
    // Stop infinite scrolling animation
    self.tableView.infiniteScrollingView.stopAnimating()
}

Trigger the infinite scrolling

tableView.triggerPullToRefresh()

Show the infinite scrolling view

tableView.showsInfiniteScrolling = true

Hide the infinite scrolling view

tableView.showsInfiniteScrolling = false

Author

Vu Van Khac, khacvv0451@gmail.com
My Facebook: https://www.facebook.com/vuvankhac.official
My Twitter: https://twitter.com/vuvankhac

License

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

You can’t perform that action at this time.