|
//
// TPTableViewController.h
// ThePaperDemo
//
// Created by scar1900 on 14/10/21.
// Copyright (c) 2014年 scar1900. All rights reserved.
//
#import "TPHttpController.h"
#import "UIScrollView+GifPullToRefresh.h"
#import "HeaderInsetTableView.h"
@interface loadFootView : UIView
@end
@protocol TPTableDelegate <NSObject>
@optional
- (void)beginToPullRefresh;
- (void)beginToPullLoad;
@end
//处理上拉刷新下拉加载的tableviewcontroller
@interface TPTableViewController : TPHttpController
//设置是否开启上拉刷新下拉加载
@property(nonatomic, strong)HeaderInsetTableView *tableView;
@property (nonatomic, strong)NSMutableArray *loadingImgs;
@property (nonatomic, strong)NSMutableArray *drawingImgs;
- (void)setLoadFooterFrame:(CGRect)frame;
@property(nonatomic, strong)NSString *nextUrl;
@property(nonatomic, weak)id<TPTableDelegate> tableDelegate;
@property(nonatomic, strong)loadFootView *loadFooter;
- (void)configCanRefresh:(BOOL)canRefresh canLoad:(BOOL)canLoad;
/*上拉刷新*/
- (void)manualRefresh; //手动调用刷新
- (void)endRefresh; //结束上拉刷新
- (void)endRefresh:(void (^)(void))animate completion:(void (^)(void))completion; //结束上拉刷新
- (void)pullRefreshHandler; //上拉刷新回调 (重写,不能直接调用)
/*下拉加载*/
- (void)manualLoad; //手动调用加载
- (void)noMoreLoad; //没有更多数据处理
- (void)loadSuccess; //加载成功
- (void)pullLoadMoreHander; //下拉加载回调 (重写,不能直接调用)
@end
|