ios k線畫法分析

Github地址 https://github.com/zhangxiaomeng1/XMLineChartViewgit

簡書 https://www.jianshu.com/u/949e63975031github

採用繼承的方法,寫了個基類,,重寫- (void)drawRect:(CGRect)rect 方法,setNeedsDisplay 調用drawRect方法;ide

- (void)drawline:(CGContextRef)contextspa

      startPoint:(CGPoint)startPoint3d

       stopPoint:(CGPoint)stopPoint繼承

           color:(UIColor *)colorit

       lineWidth:(CGFloat)lineWitdth;class

 

- (void)drawLabelPrice:(CGContextRef)context;方法

 

//高亮狀態滑動margin

- (void)drawHighlighted:(CGContextRef)context

                  point:(CGPoint)point

                   idex:(NSInteger)idex

                  value:(id)value

                  color:(UIColor *)color

              lineWidth:(CGFloat)lineWidth;

 

 

- (void)drawLabel:(CGContextRef)context

   attributesText:(NSAttributedString *)attributesText

             rect:(CGRect)rect;

//畫柱狀圖

- (void)drawRect:(CGContextRef)context

            rect:(CGRect)rect

           color:(UIColor*)color;

 

 

- (void)drawGridBackground:(CGContextRef)context

                      rect:(CGRect)rect;

相關文章
相關標籤/搜索