Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added __block variable to avoid block copy of controller, which resul…

…ts in a retain cycle with SVPullToRefresh
  • Loading branch information...
commit ece08fb417ad4334a843a3978a3a7fe5a8b6aa50 1 parent 4949886
Christopher Pickslay chrispix authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  Demo/SVPullToRefreshDemo/SVViewController.m
3  Demo/SVPullToRefreshDemo/SVViewController.m
@@ -20,9 +20,10 @@ @implementation SVViewController
- (void)viewDidLoad {
[super viewDidLoad];
+ __block SVPullToRefresh *ptr = tableView.pullToRefreshView;
[self.tableView addPullToRefreshWithActionHandler:^{
NSLog(@"refresh dataSource");
- [tableView.pullToRefreshView performSelector:@selector(stopAnimating) withObject:nil afterDelay:2];
+ [ptr performSelector:@selector(stopAnimating) withObject:nil afterDelay:5];
// that's it!
Please sign in to comment.
Something went wrong with that request. Please try again.