iOS拉動刷新實現:Pull-to-Refresh.Rentals-iOS
這個項目的目標是提供一個簡單和可定制的拉動刷新實現。
使用
For a working implementation, Have a look at the Sample Project - sample
- Add folder YALSunnyRefreshControll to your project.
- Implement header and setup YALSunnyRefreshControl as a property.
- Init and associate YALSunnyRefreshControl with your UITableView or UICollectionView.
- 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]; }
本文由用戶 y37f 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!