koa

KoaPullToRefresh

Add this custom, flat, minimal, modern pull-to-refresh control to your app. You can change the font, colors, size and even replace the spinning icon using FontAwesome. This library is very easy to add and customize. Enjoy.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

86

Maintenance

Last Commit

8yrs ago

Contributors

2

Package

Dependencies

1

License

MIT

Categories

Readme

[Not maintained.]

KoaPullToRefresh Build Status

KoaPullToRefresh is a minimal & easily customizable pull-to-refresh control. You can change the font, colors, size and even replace the spinning icon using FontAwesome. This library is very easy to add and customize. This pull to refresh control is developed for Teambox and is based on the SVPullToRefresh and use ios-fontawesome to work with font awesome icons.

Installation

From CocoaPods

  1. Add pod 'KoaPullToRefresh' to your Podfile.
  2. Edit your app's Info.plist to contain the key: "Fonts provided by application" (UIAppFonts). Then add FontAwesome.ttf to the list under that key.

Manually

  1. Drag the KoaPullToRefresh/KoaPullToRefresh folder into your project.
  2. Add the QuartCore framework to your project.
  3. Edit your app's Info.plist to contain the key: "Fonts provided by application" (UIAppFonts). Then add FontAwesome.ttf to the list under that key.
  4. Import KoaPullToRefresh.h.

Usage

Adding KoaPullToRefresh

Add this in your viewDidLoad:

[tableView addPullToRefreshWithActionHandler:^{
    // Tasks to do on refresh. Update datasource, add rows, …
    // Call [tableView.pullToRefreshView stopAnimating] when done.
}];

Adding background color:

[tableView addPullToRefreshWithActionHandler:^{
    // Tasks to do on refresh. Update datasource, add rows, …
    // Call [tableView.pullToRefreshView stopAnimating] when done.
} withBackgroundColor:[UIColor blueColor]];

Adding the height of showed pixels:

[tableView addPullToRefreshWithActionHandler:^{
    // Tasks to do on refresh. Update datasource, add rows, …
    // Call [tableView.pullToRefreshView stopAnimating] when done.
} withBackgroundColor:[UIColor blueColor] withPullToRefreshHeightShowed:2];

Customize KoaPullToRefresh

Set the color of fontAwesome icon and text:

[self.tableView.pullToRefreshView setTextColor:[UIColor whiteColor]];

Set the text font:

[self.tableView.pullToRefreshView setTextFont:[UIFont fontWithName:@"OpenSans-Bold" size:14]];

Set the font awesome icon:

[self.tableView.pullToRefreshView setFontAwesomeIcon:@"icon-refresh"];

Set titles:

[self.tableView.pullToRefreshView setTitle:@"Pull" forState:KoaPullToRefreshStateStopped];
[self.tableView.pullToRefreshView setTitle:@"Release" forState:KoaPullToRefreshStateTriggered];
[self.tableView.pullToRefreshView setTitle:@"Loading" forState:KoaPullToRefreshStateLoading];

Manage KoaPullToRefresh

Start animating KoaPullToRefresh (viewDidLoad)

[self.tableView.pullToRefreshView startAnimating];

Stop animating KoaPullToRefresh

[self.tableView.pullToRefreshView stopAnimating];

Requirements

  • iOS >= 5.0
  • ARC

Contact

License

KoaPullToRefresh is available under the MIT License. See the License file for more info.

githalytics.com alpha

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100