59 lines
1.1 KiB
C
59 lines
1.1 KiB
C
|
|
//
|
||
|
|
// PYTableViewController.h
|
||
|
|
// Food
|
||
|
|
//
|
||
|
|
// Created by ko1o on 2019/7/25.
|
||
|
|
// Copyright © 2019年 ko1o. All rights reserved.
|
||
|
|
//
|
||
|
|
|
||
|
|
#import "PYBaseViewController.h"
|
||
|
|
#import "MJRefresh.h"
|
||
|
|
#import <UITableView+FDTemplateLayoutCell.h>
|
||
|
|
|
||
|
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
|
||
|
|
@interface PYTableCell : UITableViewCell
|
||
|
|
|
||
|
|
@property (nonatomic, strong) id model;
|
||
|
|
|
||
|
|
- (void)setupUI;
|
||
|
|
|
||
|
|
@end
|
||
|
|
|
||
|
|
@interface PYTableViewController : PYBaseViewController <UITableViewDelegate, UITableViewDataSource>
|
||
|
|
|
||
|
|
@property (nonatomic, strong) UITableView *tableView;
|
||
|
|
|
||
|
|
@property (nonatomic, strong) NSMutableArray *itemsM;
|
||
|
|
|
||
|
|
- (CGFloat)rowHegight; // 默认68
|
||
|
|
// 继承PYTableCell
|
||
|
|
- (Class)cellClass; // Default is PYTableCell
|
||
|
|
|
||
|
|
- (BOOL)zeroContentInset;
|
||
|
|
|
||
|
|
/// 分页加载
|
||
|
|
@property (nonatomic, assign) int currentPage;
|
||
|
|
|
||
|
|
/// 总个数
|
||
|
|
@property (nonatomic, assign) NSUInteger totalCount;
|
||
|
|
|
||
|
|
/// 是否可以下拉刷新 Default is YES.
|
||
|
|
- (BOOL)refreshEnable;
|
||
|
|
|
||
|
|
/// 是否可以加载更多 Default is YES.
|
||
|
|
- (BOOL)loadMoreEnable;
|
||
|
|
|
||
|
|
/// 开始刷新
|
||
|
|
- (void)startRefresh;
|
||
|
|
|
||
|
|
/// 开始加载更多
|
||
|
|
- (void)startLoadMore;
|
||
|
|
|
||
|
|
// 默认为YES 主要是MTPage使用
|
||
|
|
- (BOOL)autoBeginRefreshWhenViewDidLoad;
|
||
|
|
|
||
|
|
@end
|
||
|
|
|
||
|
|
NS_ASSUME_NONNULL_END
|