BDBSpinKitRefreshControl 1.0.3

BDBSpinKitRefreshControl 1.0.3

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Bradley David Bergeron.



BDBSpinKitRefreshControl is a drop-in replacement for UIRefreshControl that utilizes the fantastic SpinKit progress indicators.

image image

Usage

Adding BDBSpinKitRefreshControl is simple: just instantiate it the way you would a regular UIRefreshControl!

self.refreshControl =
    [BDBSpinKitRefreshControl refreshControlWithStyle:RTSpinKitViewStyleBounce color:[UIColor redColor]];
[self.refreshControl addTarget:self
                        action:@selector(doSomething:)
              forControlEvents:UIControlEventValueChanged];

Styles and Color

BDBSpinKitRefreshControl supports all of the currently implemented styles in the SpinKit-ObjC project. For full documentation, please take a look at its project page.

In order to mimic as closely as possible the behavior of a standard UIRefreshControl, I've added a shouldChangeColorInstantly property that defaults to NO. With a standard UIRefreshControl, if you attempt to change the tintColor property while it is visible, nothing will happen. On the next pull, however, the color change will have taken effect. If you wish to allow changing the color while the refresh control is visible, simply set shouldChangeColorInstantly to YES when instantiating.

Credits

BDBSpinKitRefreshControl was created by Bradley David Bergeron and utilizes SpinKit-ObjC by Ramon Torres.