| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- //
- // MultiRowColumnTable.h
- // IBOSSmini
- //
- // Created by apple on 16/10/19.
- // Copyright © 2016年 elongtian. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- @protocol ItemClickDelegate <NSObject>
- @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<UIScrollViewDelegate>
- {
- //左下列视图
- 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<ItemClickDelegate> clickDelegate;
- @property(strong,nonatomic) UIColor *titleBackgroudColor;
- /**
- * 用数据项填冲数据
- */
- -(void)fillData;
- /**
- * 用指定显示区域 与 数据源初始化对象
- */
- - (id)initWithFrame:(CGRect)aRect data:(DataGridComponentDataSource*)aDataSource;
- @end
|