• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

sergigracia/KoaPullToRefresh

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

sergigracia/KoaPullToRefresh

开源软件地址:

https://github.com/sergigracia/KoaPullToRefresh

开源编程语言:

Objective-C 98.5%

开源软件介绍:

[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




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap