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数组集
//harr横坐标集合,varr竖坐标集合,hwidth横向每项宽度,horhigth横向每项的高度,vwidth竖向每项的宽度,dataArr数组集
-(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;