Skip to content

简单易用的上拉加载、下拉刷新组件,可自定义头部和底部视图,可单独实现下拉刷新,上拉加载更多。用法:/** * * SEE SYRefreshTable (https://github.com/reesun1130/SYRefreshTable) for instructions. * * USE SYRefreshTable LIKE: * * @interface ViewController : SYTableViewController * * OVERRIDE refresh、loadMore、scrollViewDidScroll * */

Notifications You must be signed in to change notification settings

reesun1130/SYRefreshTable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SY Refresh Table

简单易用的上拉加载、下拉刷新组件,可自定义头部和底部视图,可单独实现下拉刷新,上拉加载更多。

Latest:Swift实现,只实现了下拉刷新,还没有实现上拉加载更多

用法:(具体请查看DEMO)

/** SEE SYRefreshTable (https://github.com/reesun1130/SYRefreshTable) for instructions.
* USE SYRefreshTable LIKE:
* @interface ViewController : SYTableViewController
* OVERRIDE refresh、loadMore、scrollViewDidScroll
*/

////////// 只需实现这三个方法 即可实现下拉刷新,上拉加载更多 #Pull to Refresh

*  - (BOOL)refresh
   {
      if (![super refresh])
         return NO;
      
      self.pageCount = 1;
      
      [lockLoadData lock];
      [self performSelector:@selector(loadItemData) withObject:nil afterDelay:0.01];
      [lockLoadData unlock];
      
      return YES;
   }

#Load More

*  - (BOOL)loadMore
   {
       if (![super loadMore])
          return NO;
       
       self.pageCount ++;

       [lockLoadData lock];
       [self performSelector:@selector(loadItemData) withObject:nil afterDelay:0.01];
       [lockLoadData unlock];

       return YES;
   }

#UIScrollViewDelegate Method

*  - (void)scrollViewDidScroll:(UIScrollView *)scrollView
   {
      [super scrollViewDidScroll:scrollView];
   }

////////// 只需实现这三个方法 即可实现下拉刷新,上拉加载更多

效果如下:

image

About

简单易用的上拉加载、下拉刷新组件,可自定义头部和底部视图,可单独实现下拉刷新,上拉加载更多。用法:/** * * SEE SYRefreshTable (https://github.com/reesun1130/SYRefreshTable) for instructions. * * USE SYRefreshTable LIKE: * * @interface ViewController : SYTableViewController * * OVERRIDE refresh、loadMore、scrollViewDidScroll * */

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published