You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
2.0 KiB
75 lines
2.0 KiB
// |
|
// CommonTableView.h |
|
// ChineseAgri-businesses |
|
// |
|
// Created by ecell on 2022/6/28. |
|
// |
|
|
|
#import <UIKit/UIKit.h> |
|
#import "ZZTableViewCell.h" |
|
|
|
NS_ASSUME_NONNULL_BEGIN |
|
|
|
@protocol CommonTableViewDelegate <NSObject> |
|
|
|
- (void)CommTableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath; |
|
|
|
@end |
|
|
|
@interface CommonTableView : UITableView |
|
|
|
|
|
/// 点击cell触发此回调方法/ |
|
typedef void(^SelectCell)(UITableView *tableView, NSIndexPath *indexPath); |
|
|
|
/// 在此block中返回你要创建的cell*/ |
|
typedef void(^CreateCell)(ZZTableViewCell *cells, NSIndexPath *indexPath); |
|
|
|
|
|
@property (nonatomic ,assign) NSInteger cellRow; |
|
|
|
@property (nonatomic ,assign) NSInteger cellSections; |
|
|
|
/// 点击cell触发此回调方法/ |
|
typedef void(^disScrollView)(UIScrollView *scrollView); |
|
|
|
|
|
/// UITableView初始化加载 |
|
/// @param frame UITableView坐标大小 |
|
/// @param style 样式 |
|
/// @param cellHeight 行高 |
|
/// @param cellRow 行数 |
|
/// @param isAdaptive 行高是否自适应 |
|
/// @param isLine 是否显示间隔线 |
|
/// @param commonCell 加载Cell |
|
/// @param createCell 返回创建的cell |
|
/// @param selectBlock cell点击事件 |
|
- (instancetype)initWithFrame:(CGRect)frame |
|
style:(UITableViewStyle)style |
|
cellHeight:(CGFloat)cellHeight |
|
cellRow:(NSInteger)cellRow |
|
isAdaptive:(BOOL)isAdaptive |
|
isLine:(BOOL)isLine |
|
commonCell:(Class)commonCell |
|
createCell:(CreateCell)createCell |
|
selectedCell:(SelectCell)selectBlock |
|
DidscrollView:(disScrollView)ScrollView; |
|
|
|
|
|
|
|
/// footerView |
|
@property (nonatomic ,strong) UIView *footerView; |
|
|
|
/// footerView |
|
@property (nonatomic ,assign) CGFloat footerViewHeight; |
|
|
|
/// 是否进入编辑删除模式 默认为NO |
|
@property (nonatomic ,assign) BOOL isEditing; |
|
|
|
@property (nonatomic, weak) id<CommonTableViewDelegate> delegates; |
|
|
|
|
|
|
|
@end |
|
|
|
NS_ASSUME_NONNULL_END
|
|
|