LHYLinesPaoPaoView.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // YJYLinesPaoPaoView.h
  3. // YJYLinesView
  4. //
  5. // Created by lihaiyang on 2018/10/23.
  6. // Copyright © 2018 lihaiyang. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "UIColor+expanded.h"
  10. typedef NS_ENUM(NSInteger,Direction){
  11. /// 顶部
  12. directionTop,
  13. /// 底部
  14. directionBottom,
  15. };
  16. @interface LHYLinesPaoPaoView : UIView
  17. @property (nonatomic,strong) UIImage *backgroudImage;
  18. @property (nonatomic,assign) CGFloat margin;
  19. @property (nonatomic,assign) CGFloat pointX;
  20. @property (nonatomic,assign) CGFloat chartContentWidth;
  21. /// 左侧是否靠边 默认为NO不靠边
  22. @property (nonatomic,assign) BOOL beyondLeft;
  23. /// 右侧是否靠边 默认为NO不靠边
  24. @property (nonatomic,assign) BOOL beyondRight;
  25. - (void)show:(NSArray *)dataArr and:(NSString *)title andTitleColor:(UIColor *)titleColor colorArr:(NSArray *)color;
  26. +(CGSize)getWidthAndHeight:(NSArray *)dataArray;
  27. /// 画边框并填充颜色
  28. -(void)drawBoxWithDirection:(Direction)direction;
  29. + (float)measureSinglelineStringWidth:(NSString*)str andFont:(UIFont*)wordFont;
  30. @end