YBPopupMenuPath.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // YBPopupMenuPath.h
  3. // YBPopupMenu
  4. //
  5. // Created by lyb on 2017/5/9.
  6. // Copyright © 2017年 lyb. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef NS_ENUM(NSInteger, YBPopupMenuArrowDirection) {
  10. YBPopupMenuArrowDirectionTop = 0, //箭头朝上
  11. YBPopupMenuArrowDirectionBottom, //箭头朝下
  12. YBPopupMenuArrowDirectionLeft, //箭头朝左
  13. YBPopupMenuArrowDirectionRight, //箭头朝右
  14. YBPopupMenuArrowDirectionNone //没有箭头
  15. };
  16. @interface YBPopupMenuPath : NSObject
  17. + (CAShapeLayer *)yb_maskLayerWithRect:(CGRect)rect
  18. rectCorner:(UIRectCorner)rectCorner
  19. cornerRadius:(CGFloat)cornerRadius
  20. arrowWidth:(CGFloat)arrowWidth
  21. arrowHeight:(CGFloat)arrowHeight
  22. arrowPosition:(CGFloat)arrowPosition
  23. arrowDirection:(YBPopupMenuArrowDirection)arrowDirection;
  24. + (UIBezierPath *)yb_bezierPathWithRect:(CGRect)rect
  25. rectCorner:(UIRectCorner)rectCorner
  26. cornerRadius:(CGFloat)cornerRadius
  27. borderWidth:(CGFloat)borderWidth
  28. borderColor:(UIColor *)borderColor
  29. backgroundColor:(UIColor *)backgroundColor
  30. arrowWidth:(CGFloat)arrowWidth
  31. arrowHeight:(CGFloat)arrowHeight
  32. arrowPosition:(CGFloat)arrowPosition
  33. arrowDirection:(YBPopupMenuArrowDirection)arrowDirection;
  34. @end