Skip to content

Give Pinterest Like PullToRefresh to any UIScrollView with just simple code

License

Notifications You must be signed in to change notification settings

kukosk/UzysCircularProgressPullToRefresh

 
 

Repository files navigation

UzysCircularProgressPullToRefresh

Give Pinterest Like PullToRefresh to any UIScrollView with just simple code

Screenshot

UzysSlideMenu features:

  • It's very simple to use.
  • Support iOS7.
  • Support only ARC
  • Support CocoaPods. (to be)

Installation

Copy over the files libary folder to your project folder

Usage

###Import header.

#import "UIScrollView+UZYSCircularProgressPullToRefresh.h"

Initialize

adding PullToRefreshActionHandler

-(void)viewWillAppear:(BOOL)animated
{
  __weak typeof(self) weakSelf = self;
  [_tableView addPullToRefreshActionHandler:^
  {
      [weakSelf insertRowAtTop];
  }];
}

programmatically trigger PullToRefresh

[_tableView triggerPullToRefresh];

stop PullToRefresh Activity Animation

[_tableView stopRefreshAnimation];

support customization

size change

[self.tableView.pullToRefreshView setSize:CGSizeMake(40.0, 40.0)];

borderWidth change

[self.tableView.pullToRefreshView setBorderWidth:4.0];

borderColor change

[self.tableView.pullToRefreshView setBorderColor:[UIColor colorWithRed:75.0 / 255.0 green:131.0 / 255.0 blue:188.0 / 255.0 alpha:1.0]];

Image Icon change

[self.tableView.pullToRefreshView setImageIcon:[UIImage imageNamed:@"thunderbird"]];

pulling offset change (UZYSRadialProgressActivityIndicator.m)

#define PullToRefreshThreshold 80.0

Removal

You have to remove when your scroll view is about to get deallocated

[self.tableView removePullToRefreshView];

Contact

License

About

Give Pinterest Like PullToRefresh to any UIScrollView with just simple code

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 97.2%
  • Ruby 2.8%