iOS拉动刷新实现:Pull-to-Refresh.Rentals-iOS

y37f 10年前

这个项目的目标是提供一个简单和可定制的拉动刷新实现。

使用

For a working implementation, Have a look at the Sample Project - sample

  1. Add folder YALSunnyRefreshControll to your project.
  2. Implement header and setup YALSunnyRefreshControl as a property.
  3. Init and associate YALSunnyRefreshControl with your UITableView or UICollectionView.
  4. Add images from Images.xcassets folder in Sample Project.
#import "YALSunnyRefreshControl.h"     @property (nonatomic,strong) YALSunnyRefreshControl *sunnyRefreshControl;     - (void)viewDidLoad {      [super viewDidLoad];      [self setupRefreshControl];  }     -(void)setupRefreshControl{         self.sunnyRefreshControl = [YALSunnyRefreshControl attachToScrollView:self.tableView                            target:self                     refreshAction:@selector(sunnyControlDidStartAnimation)];     }     -(void)sunnyControlDidStartAnimation{      // start loading something  }     -(IBAction)endAnimationHandle{      [self.sunnyRefreshControl endRefreshing];  }

iOS拉动刷新实现:Pull-to-Refresh.Rentals-iOS

项目主页:http://www.open-open.com/lib/view/home/1426422681931