1.? DrawScrollView.h
?//? Created by yinbo on 2016/11/10.//? Copyright ? 2016年 yinbo. All rights reserved.//#import@interface DrawScrollView : UIView
-(void)setHorizontalArr:(NSArray *)hArr withVerticalArr:(NSArray *)vArr withHorWidth:(float)hwidth withHorHigth:(float)horhigth withVertical:(float)vwidth? withdataArr:(NSArray *)dataArr ;//harr橫坐標集合,varr豎坐標集合,hwidth橫向每項寬度,horhigth橫向每項的高度,vwidth豎向每項的寬度召川,dataArr數(shù)組集
//harr橫坐標集合,varr豎坐標集合,hwidth橫向每項寬度鳖孤,horhigth橫向每項的高度,vwidth豎向每項的寬度,dataArr數(shù)組集
-(void)setHorizontalArr:(NSArray *)hArr withVerticalArr:(NSArray *)vArr withHorWidth:(float)hwidth withHorHigth:(float)horhigth withVertical:(float)vwidth? withdataArr:(NSArray *)dataArr withZwidth:(float)zwidth;
@property(nonatomic,strong)NSArray *harr;
@property(nonatomic,strong)NSArray *varr;
@property(nonatomic,assign)float hwidth;
@property(nonatomic,assign)float horhigth;
@property(nonatomic,assign)float vwidth;
@property(nonatomic,assign)float zwidth;
@property(nonatomic,assign)BOOL isLine;
@property(nonatomic,strong)NSArray *dataArr;
@end
2.DrawScrollView.m
//
//? DrawScrollView.m
//
//? Created by yinbo on 2016/11/10.
//? Copyright ? 2016年 yinbo. All rights reserved.
//
#import "DrawScrollView.h"
@implementation DrawScrollView
-(id)initWithFrame:(CGRect)frame{
self=[super initWithFrame:frame];
return? self;
}
-(void)setHorizontalArr:(NSArray *)hArr withVerticalArr:(NSArray *)vArr withHorWidth:(float)hwidth withHorHigth:(float)horhigth withVertical:(float)vwidth? withdataArr:(NSArray *)dataArr {
_harr=hArr;
_varr=vArr;
_hwidth=hwidth;
_horhigth=horhigth;
_vwidth=vwidth;
_dataArr=dataArr;
_isLine=YES;