QBRefreshControl is an abstract base class for creating a refresh control.
This demo uses QBAnimationSequence as a submodule for animation control, so you should do
git submodule init
git submodule update
at first.
It is very easy to create your own refresh control conforming QBRefreshControl.
- Create a subclass of QBRefreshControl.
- Override
stateChanged:
method to specify the behavior for each state of the control.
In this method, you have to write aswitch()
block.- QBRefreshControlStateHidden
- QBRefreshControlStatePullingDown
- QBRefreshControlStateOveredThreshold
- QBRefreshControlStateStopping
- Override
init
,beginRefreshing
,endRefreshing
as necessary.
See QBRefreshControl project for example usage.
QBRefreshControl is released under the MIT License, see LICENSE.txt.