/QBRefreshControl

An abstract base class for creating a refresh control.

Primary LanguageObjective-CMIT LicenseMIT

QBRefreshControl

QBRefreshControl is an abstract base class for creating a refresh control.

NOTES

This demo uses QBAnimationSequence as a submodule for animation control, so you should do

git submodule init
git submodule update

at first.

ScreenShot

ss01.png ss02.png ss03.png

Usage

It is very easy to create your own refresh control conforming QBRefreshControl.

  1. Create a subclass of QBRefreshControl.
  2. Override stateChanged: method to specify the behavior for each state of the control.
    In this method, you have to write a switch() block.
    • QBRefreshControlStateHidden
    • QBRefreshControlStatePullingDown
    • QBRefreshControlStateOveredThreshold
  • QBRefreshControlStateStopping
  1. Override init, beginRefreshing, endRefreshing as necessary.

Example

See QBRefreshControl project for example usage.

License

QBRefreshControl is released under the MIT License, see LICENSE.txt.