// // MultiRowColumnTable.h // IBOSS // // Created by apple on 16/10/19. // Copyright © 2017年 沈阳东科云信软件有限公司. All rights reserved. // #import @protocol ItemClickDelegate @optional - (void)ItemClick:(int)index; @end /** * DataGrid所用数据源对象 */ @interface DataGridComponentDataSource : NSObject { /** * 标题列表 */ NSMutableArray *titles; /** * 数据体,其中包函其它列表(NSArray) */ NSMutableArray *data; /** * 列宽 */ NSMutableArray *columnWidth; /** * 列高 */ NSMutableArray *columnHeight; } @property (strong,nonatomic) NSMutableArray *titles; @property (strong,nonatomic) NSMutableArray *data; @property (strong,nonatomic) NSMutableArray *columnWidth; @property (strong,nonatomic) NSMutableArray *columnHeight; @end @interface DataGridScrollView : UIScrollView @property (strong,nonatomic)id dataGridComponent; @end /** * 数据列表组件,支持上下与左右滑动 */ @interface MultiRowColumnTable : UIView { //左下列视图 DataGridScrollView *vLeft; //右下列视图 DataGridScrollView *vRight; //右下列表内容 UIView *vRightContent; //左下列表内容 UIView *vLeftContent; //右上标题 UIView *vTopRight; //左上标题 UIView *vTopLeft; //列表数据源 DataGridComponentDataSource *dataSource; //内容总高度 float contentHeight ; //内容总宽度 float contentWidth; //单元格默认高度 float cellHeight; //单元格最大高度 float cellMaxHeight; //单元格默认宽度 float cellWidth; } @property (readonly,nonatomic) DataGridScrollView *vRight; @property (readonly,nonatomic) DataGridScrollView *vLeft; @property (readonly,nonatomic) float cellHeight; @property (strong,nonatomic) DataGridComponentDataSource *dataSource; @property (assign,nonatomic) CGFloat fontTitleSize; @property (assign,nonatomic) CGFloat fontContentSize; @property (strong,nonatomic) id clickDelegate; @property (strong,nonatomic) UIColor *titleBackgroudColor; /** * 用数据项填冲数据 */ - (void)fillData; /** * 用指定显示区域 与 数据源初始化对象 */ - (id)initWithFrame:(CGRect)aRect data:(DataGridComponentDataSource*)aDataSource; @end