Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Latest commit

 

History

History
30 lines (18 loc) · 1.72 KB

README.md

File metadata and controls

30 lines (18 loc) · 1.72 KB

BDBSpinKitRefreshControl

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.