You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
1.6 KiB

//
// YBPopupMenuPath.h
// YBPopupMenu
//
// Created by lyb on 2017/5/9.
// Copyright © 2017年 lyb. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, YBPopupMenuArrowDirection) {
YBPopupMenuArrowDirectionTop = 0, //箭头朝上
YBPopupMenuArrowDirectionBottom, //箭头朝下
YBPopupMenuArrowDirectionLeft, //箭头朝左
YBPopupMenuArrowDirectionRight, //箭头朝右
YBPopupMenuArrowDirectionNone //没有箭头
};
@interface YBPopupMenuPath : NSObject
+ (CAShapeLayer *)yb_maskLayerWithRect:(CGRect)rect
rectCorner:(UIRectCorner)rectCorner
cornerRadius:(CGFloat)cornerRadius
arrowWidth:(CGFloat)arrowWidth
arrowHeight:(CGFloat)arrowHeight
arrowPosition:(CGFloat)arrowPosition
arrowDirection:(YBPopupMenuArrowDirection)arrowDirection;
+ (UIBezierPath *)yb_bezierPathWithRect:(CGRect)rect
rectCorner:(UIRectCorner)rectCorner
cornerRadius:(CGFloat)cornerRadius
borderWidth:(CGFloat)borderWidth
borderColor:(UIColor *)borderColor
backgroundColor:(UIColor *)backgroundColor
arrowWidth:(CGFloat)arrowWidth
arrowHeight:(CGFloat)arrowHeight
arrowPosition:(CGFloat)arrowPosition
arrowDirection:(YBPopupMenuArrowDirection)arrowDirection;
@end