[
  {
    "path": ".gitignore",
    "content": "# Xcode\n#\n# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore\n\n## Build generated\nbuild/\nDerivedData/\n\n## Various settings\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata/\n\n## Other\n*.moved-aside\n*.xccheckout\n*.xcscmblueprint\n\n## Obj-C/Swift specific\n*.hmap\n*.ipa\n*.dSYM.zip\n*.dSYM\n\n# CocoaPods\n#\n# We recommend against adding the Pods directory to your .gitignore. However\n# you should judge for yourself, the pros and cons are mentioned at:\n# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control\n#\n# Pods/\n\n# Carthage\n#\n# Add this line if you want to avoid checking in source code from Carthage dependencies.\n# Carthage/Checkouts\n\nCarthage/Build\n\n# fastlane\n#\n# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the\n# screenshots whenever they are needed.\n# For more information about the recommended setup visit:\n# https://docs.fastlane.tools/best-practices/source-control/#source-control\n\nfastlane/report.xml\nfastlane/Preview.html\nfastlane/screenshots/**/*.png\nfastlane/test_output\n\n# Code Injection\n#\n# After new code Injection tools there's a generated folder /iOSInjectionProject\n# https://github.com/johnno1962/injectionforxcode\n\niOSInjectionProject/\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 WellsYC\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "![logo](logo/original-horizontal.png)\n\n# YCMenuView\na popup menu which can be highly customized.(一个可以根据关联点和关联视图弹出的菜单，类似QQ导航栏右侧菜单。可满足高度自定义需求。)\n\n![image](https://github.com/WellsYC/YCMenuView/blob/master/menuView.gif)\n\n\n## Usage\n\n\n**Method:**  using Cocoapods\n\n``pod 'YCMenuView'``\n\nthen\n\n```objective-c\n#import <YCMenuView.h>\n```\n\n**Method2**: moving ``YCMenuViewCompont``folder into your project.\n\n\n## Example\n\n```\n// 例子：以导航栏右侧按钮为关联按钮\n- (IBAction)buttonItemClick:(UIBarButtonItem *)sender {\n\n    // 创建YCMenuAction\n    YCMenuAction *action = [YCMenuAction actionWithTitle:@\"首页\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    YCMenuAction *action1 = [YCMenuAction actionWithTitle:@\"个人\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    YCMenuAction *action2 = [YCMenuAction actionWithTitle:@\"最新\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    YCMenuAction *action3 = [YCMenuAction actionWithTitle:@\"搜索页\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    YCMenuAction *action4 = [YCMenuAction actionWithTitle:@\"新闻页\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n\n    // 按钮（YCMenuAction）的集合\n    self.arr = @[action,action1,action2,action3,action4,action,action1,action2];\n\n    // 创建YCMenuView(根据关联点或者关联视图)\n    YCMenuView *view = [YCMenuView menuWithActions:self.arr width:140 relyonView:sender];\n    \n    // 自定义设置\n    view.menuColor = [UIColor whiteColor];\n    view.separatorColor = [UIColor whiteColor];\n    view.maxDisplayCount = 5;  // 最大展示数量（其他的需要滚动才能看到）\n    view.offset = 0; // 关联点和弹出视图的偏移距离\n    view.textColor = [UIColor whiteColor];\n    view.textFont = [UIFont boldSystemFontOfSize:18];\n    view.menuCellHeight = 60;\n    view.dismissOnselected = YES;\n    view.dismissOnTouchOutside = YES;\n    \n    // 显示\n    [view show];\n}\n```\n\n"
  },
  {
    "path": "YCMenuView.podspec",
    "content": "Pod::Spec.new do |s|\n\ns.name         = \"YCMenuView\"\ns.version      = \"1.2.0\"\ns.ios.deployment_target = '8.0'\ns.summary      = \"a popup menu which can be highly customized.\"\ns.homepage     = \"https://github.com/WellsYC/YCMenuView\"\ns.license      = { :type => \"MIT\", :file => \"LICENSE\" }\ns.author       = { \"WellsYC\" => \"461620115@qq.com\" }\ns.license      = \"MIT\"\ns.source       = { :git => \"https://github.com/WellsYC/YCMenuView.git\", :tag => s.version }\ns.source_files  = 'YCMenuViewCompont'\ns.requires_arc = true\n\nend\n\n"
  },
  {
    "path": "YCMenuViewCompont/YCMenuView.h",
    "content": "//\n//  YCMenuView.h\n//  Demo\n//\n//  Created by 蔡亚超 on 2018/8/28.\n//  Copyright © 2018年 WellsCai. All rights reserved.\n//  github地址：https://github.com/WellsYC/YCMenuView\n//  简书地址：https://www.jianshu.com/u/f853cbc68abb\n\n#import <UIKit/UIKit.h>\n\n@class YCMenuAction;\n@interface YCMenuView : UIView\n//默认倒角   default = 5.0\n@property (nonatomic,assign) CGFloat                        cornerRaius;\n//设置分割线颜色 default = 灰色\n@property (nonatomic,strong) UIColor                       *separatorColor;\n//设置菜单颜色  default = 白色（也可以通过BackgroundColor设置）\n@property (nonatomic,strong) UIColor                       *menuColor;\n//设置菜单单元格高度  default = 44\n@property (nonatomic,assign) CGFloat                        menuCellHeight;\n//最大显示数量  default = 5\n@property (nonatomic,assign) NSInteger                      maxDisplayCount;\n//是否显示阴影 default = YES(默认设置，也可以自己通过layer属性设置)\n@property (nonatomic,assign,getter = isShadowShowing)BOOL   isShowShadow;\n//选择菜单选项后消失 default = YES\n@property (nonatomic,assign)  BOOL                          dismissOnselected;\n//点击菜单外消失 default = YES\n@property (nonatomic,assign)  BOOL                          dismissOnTouchOutside;\n//设置字体大小 default = 15\n@property (nonatomic,assign)  UIFont                        *textFont;\n//设置字体颜色 default = 黑色\n@property (nonatomic,strong)  UIColor                       *textColor;\n//设置偏移距离 default = 0（与触摸点在Y轴上的偏移）\n@property (nonatomic,assign)  CGFloat                       offset;\n\n// 从关联点创建\n+ (instancetype)menuWithActions:(NSArray<YCMenuAction *> *)actions width:(CGFloat)width atPoint:(CGPoint)point;\n// 从关联视图创建（可以是UIView和UIBarButtonItem）\n+ (instancetype)menuWithActions:(NSArray<YCMenuAction *> *)actions width:(CGFloat)width relyonView:(id)view;\n- (void)show;\n- (instancetype)init NS_UNAVAILABLE;\n+ (instancetype)new NS_UNAVAILABLE;\n@end\n\n@interface YCMenuAction : NSObject\n@property (nonatomic, readonly) NSString      *title;\n@property (nonatomic, readonly) UIImage       *image;\n@property (nonatomic,copy, readonly) void (^handler)(YCMenuAction *action);\n+ (instancetype)actionWithTitle:(NSString *)title image:(UIImage *)image handler:(void (^)(YCMenuAction *action))handler;\n- (instancetype)init NS_UNAVAILABLE;\n+ (instancetype)new NS_UNAVAILABLE;\n@end\n\n\n\n\n"
  },
  {
    "path": "YCMenuViewCompont/YCMenuView.m",
    "content": "//\n//  YCMenuView.m\n//  Demo\n//\n//  Created by 蔡亚超 on 2018/8/28.\n//  Copyright © 2018年 WellsCai. All rights reserved.\n//  github地址：https://github.com/WellsYC/YCMenuView\n//  简书地址：https://www.jianshu.com/u/f853cbc68abb\n\n\n#define kScreenWidth               [UIScreen mainScreen].bounds.size.width\n#define kScreenHeight              [UIScreen mainScreen].bounds.size.height\n#define kMainWindow                [UIApplication sharedApplication].keyWindow\n\n#define kArrowWidth          15\n#define kArrowHeight         10\n#define kDefaultMargin       10\n#define kAnimationTime       0.25\n\n#import \"YCMenuView.h\"\n\n@interface UIView (YCFrame)\n@property (nonatomic, assign) CGFloat x;\n@property (nonatomic, assign) CGFloat y;\n@property (nonatomic, assign) CGPoint origin;\n\n@property (nonatomic, assign) CGFloat centerX;\n@property (nonatomic, assign) CGFloat centerY;\n\n@property (nonatomic, assign) CGFloat width;\n@property (nonatomic, assign) CGFloat height;\n@property (nonatomic, assign) CGSize  size;\n@end\n\n@implementation UIView (YCFrame)\n- (CGFloat)x\n{\n    return self.frame.origin.x;\n}\n- (void)setX:(CGFloat)value\n{\n    CGRect frame = self.frame;\n    frame.origin.x = value;\n    self.frame = frame;\n}\n- (CGFloat)y\n{\n    return self.frame.origin.y;\n}\n- (void)setY:(CGFloat)value\n{\n    CGRect frame = self.frame;\n    frame.origin.y = value;\n    self.frame = frame;\n}\n- (CGPoint)origin\n{\n    return self.frame.origin;\n}\n- (void)setOrigin:(CGPoint)origin\n{\n    CGRect frame = self.frame;\n    frame.origin = origin;\n    self.frame = frame;\n}\n- (CGFloat)centerX\n{\n    return self.center.x;\n}\n- (void)setCenterX:(CGFloat)centerX\n{\n    CGPoint center = self.center;\n    center.x = centerX;\n    self.center = center;\n}\n- (CGFloat)centerY\n{\n    return self.center.y;\n}\n- (void)setCenterY:(CGFloat)centerY\n{\n    CGPoint center = self.center;\n    center.y = centerY;\n    self.center = center;\n}\n- (CGFloat)width\n{\n    return self.frame.size.width;\n}\n- (void)setWidth:(CGFloat)width\n{\n    CGRect frame = self.frame;\n    frame.size.width = width;\n    self.frame = frame;\n}\n- (CGFloat)height\n{\n    return self.frame.size.height;\n}\n- (void)setHeight:(CGFloat)height\n{\n    CGRect frame = self.frame;\n    frame.size.height = height;\n    self.frame = frame;\n}\n- (CGSize)size\n{\n    return self.frame.size;\n}\n- (void)setSize:(CGSize)size\n{\n    CGRect frame = self.frame;\n    frame.size = size;\n    self.frame = frame;\n}\n@end\n\n@interface YCMenuCell : UITableViewCell\n@property (nonatomic,assign) BOOL         isShowSeparator;\n@property (nonatomic,strong) UIColor    * separatorColor;\n@end\n@implementation YCMenuCell\n- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{\n    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {\n        _isShowSeparator = YES;\n        _separatorColor = [UIColor lightGrayColor];\n    }\n    return self;\n}\n\n- (void)setSeparatorColor:(UIColor *)separatorColor{\n    _separatorColor = separatorColor;\n    [self setNeedsDisplay];\n}\n- (void)setIsShowSeparator:(BOOL)isShowSeparator{\n    _isShowSeparator = isShowSeparator;\n    [self setNeedsDisplay];\n}\n- (void)drawRect:(CGRect)rect{\n    if (!_isShowSeparator)return;\n    UIBezierPath *path = [UIBezierPath bezierPathWithRect:CGRectMake(0, rect.size.height - 0.5, rect.size.width, 0.5)];\n    [_separatorColor setFill];\n    [path fillWithBlendMode:kCGBlendModeNormal alpha:1.0f];\n    [path closePath];\n}\n@end\n\n\n@interface YCMenuAction()\n@property (nonatomic) NSString      *title;\n@property (nonatomic) UIImage       *image;\n@property (copy, nonatomic)void (^handler)(YCMenuAction *);\n@end\n@implementation YCMenuAction\n+ (instancetype)actionWithTitle:(NSString *)title image:(UIImage *)image handler:(void (^)(YCMenuAction *))handler{\n    YCMenuAction *action = [[YCMenuAction alloc] initWithTitle:title image:image handler:handler];\n    return action;\n}\n- (instancetype)initWithTitle:(NSString *)title image:(UIImage *)image handler:(void (^)(YCMenuAction *))handler{\n    if (self = [super init]) {\n        _title = title;\n        _image = image;\n        _handler = [handler copy];\n    }\n    return self;\n}\n@end\n\n\n@interface YCMenuView()<UITableViewDelegate,UITableViewDataSource>\n{\n    CGPoint          _refPoint;\n    UIView          *_refView;\n    CGFloat          _menuWidth;\n    \n    CGFloat         _arrowPosition; // 三角底部的起始点x\n    CGFloat         _topMargin;\n    BOOL            _isReverse; // 是否反向\n    BOOL            _needReload; //是否需要刷新\n}\n@property(nonatomic,copy) NSArray<YCMenuAction *>   *actions;\n@property(nonatomic,strong)UITableView              *tableView;\n@property(nonatomic,strong)UIView                   *contentView;\n@property(nonatomic,strong)UIView                   *bgView;\n\n@end\n\nstatic NSString *const menuCellID = @\"YCMenuCell\";\n@implementation YCMenuView\n\n+ (instancetype)menuWithActions:(NSArray<YCMenuAction *> *)actions width:(CGFloat)width atPoint:(CGPoint)point{\n    NSAssert(width>0.0f, @\"width要大于0\");\n    YCMenuView *menu = [[YCMenuView alloc] initWithActions:actions width:width atPoint:point];\n    return menu;\n}\n+ (instancetype)menuWithActions:(NSArray<YCMenuAction *> *)actions width:(CGFloat)width relyonView:(id)view{\n    NSAssert(width>0.0f, @\"width要大于0\");\n    NSAssert([view isKindOfClass:[UIView class]]||[view isKindOfClass:[UIBarButtonItem class]], @\"relyonView必须是UIView或UIBarButtonItem\");\n    YCMenuView *menu = [[YCMenuView alloc] initWithActions:actions width:width relyonView:view];\n    return menu;\n}\n\n- (instancetype)initWithActions:(NSArray<YCMenuAction *> *)actions width:(CGFloat)width atPoint:(CGPoint)point{\n    if (self = [super init]) {\n        _actions = [actions copy];\n        _refPoint = point;\n        _menuWidth = width;\n        [self defaultConfiguration];\n        [self setupSubView];\n    }\n    return self;\n}\n\n- (instancetype)initWithActions:(NSArray<YCMenuAction *> *)actions width:(CGFloat)width relyonView:(id)view{\n    if (self = [super init]) {\n        // 针对UIBarButtonItem做的处理\n        if ([view isKindOfClass:[UIBarButtonItem class]]) {\n            UIView *bgView = [view valueForKey:@\"_view\"];\n            _refView = bgView;\n        }else{\n            _refView = view;\n        }\n        _actions = [actions copy];\n        _menuWidth = width;\n        [self defaultConfiguration];\n        [self setupSubView];\n    }\n    return self;\n}\n\n- (void)defaultConfiguration{\n    self.alpha = 0.0f;\n    [self setDefaultShadow];\n    \n    _cornerRaius = 5.0f;\n    _separatorColor = [UIColor blackColor];\n    _menuColor = [UIColor whiteColor];\n    _menuCellHeight = 44.0f;\n    _maxDisplayCount = 5;\n    _isShowShadow = YES;\n    _dismissOnselected = YES;\n    _dismissOnTouchOutside = YES;\n    \n    _textColor = [UIColor blackColor];\n    _textFont = [UIFont systemFontOfSize:15.0f];\n    _offset = 0.0f;\n}\n\n- (void)setupSubView{\n    [self calculateArrowAndFrame];\n    [self setupMaskLayer];\n    [self addSubview:self.contentView];\n}\n\n- (void)reloadData{\n    [self.contentView removeFromSuperview];\n    [self.tableView removeFromSuperview];\n    self.contentView = nil;\n    self.tableView = nil;\n    [self setupSubView];\n}\n\n- (CGPoint)getRefPoint{\n    CGRect absoluteRect = [_refView convertRect:_refView.bounds toView:kMainWindow];\n    CGPoint refPoint;\n    CGFloat menuHeight = (_actions.count > _maxDisplayCount) ? _maxDisplayCount * _menuCellHeight + kArrowHeight: _actions.count * _menuCellHeight + kArrowHeight;\n    if (absoluteRect.origin.y + absoluteRect.size.height +  menuHeight > kScreenHeight - 10) {\n        refPoint = CGPointMake(absoluteRect.origin.x + absoluteRect.size.width / 2, absoluteRect.origin.y);\n        _isReverse = YES;\n    }else{\n        refPoint = CGPointMake(absoluteRect.origin.x + absoluteRect.size.width / 2, absoluteRect.origin.y + absoluteRect.size.height);\n        _isReverse = NO;\n    }\n    return refPoint;\n}\n\n- (void)show{\n    // 自定义设置统一在这边刷新一次\n    if (_needReload) [self reloadData];\n    \n    [kMainWindow addSubview: self.bgView];\n    [kMainWindow addSubview: self];\n    self.layer.affineTransform = CGAffineTransformMakeScale(0.1, 0.1);\n    [UIView animateWithDuration: kAnimationTime animations:^{\n        self.layer.affineTransform = CGAffineTransformIdentity;\n        self.alpha = 1.0f;\n        self.bgView.alpha = 1.0f;\n    }];\n}\n\n- (void)dismiss{\n    if (!_dismissOnTouchOutside) return;\n    [UIView animateWithDuration: kAnimationTime animations:^{\n        self.layer.affineTransform = CGAffineTransformMakeScale(0.1, 0.1);\n        self.alpha = 0.0f;\n        self.bgView.alpha = 0.0f;\n    } completion:^(BOOL finished) {\n        self.layer.affineTransform = CGAffineTransformIdentity;\n        [self removeFromSuperview];\n        [self.bgView removeFromSuperview];\n    }];\n}\n\n#pragma mark - Private\n- (void)setupMaskLayer{\n    CAShapeLayer *layer = [self drawMaskLayer];\n    self.contentView.layer.mask = layer;\n}\n\n- (void)calculateArrowAndFrame{\n    if (_refView) {\n        _refPoint = [self getRefPoint];\n    }\n    \n    CGFloat originX;\n    CGFloat originY;\n    CGFloat width;\n    CGFloat height;\n    \n    width = _menuWidth;\n    height = (_actions.count > _maxDisplayCount) ? _maxDisplayCount * _menuCellHeight + kArrowHeight: _actions.count * _menuCellHeight + kArrowHeight;\n    // 默认在中间\n    _arrowPosition = 0.5 * width - 0.5 * kArrowWidth;\n    \n    // 设置出menu的x和y（默认情况）\n    originX = _refPoint.x - _arrowPosition - 0.5 * kArrowWidth;\n    originY = _refPoint.y;\n    \n    // 考虑向左右展示不全的情况，需要反向展示\n    if (originX + width > kScreenWidth - 10) {\n        originX = kScreenWidth - kDefaultMargin - width;\n    }else if (originX < 10) {\n        //向上的情况间距也至少是kDefaultMargin\n        originX = kDefaultMargin;\n    }\n    \n    //设置三角形的起始点\n    if ((_refPoint.x <= originX + width - _cornerRaius) && (_refPoint.x >= originX + _cornerRaius)) {\n        _arrowPosition = _refPoint.x - originX - 0.5 * kArrowWidth;\n    }else if (_refPoint.x < originX + _cornerRaius) {\n        _arrowPosition = _cornerRaius;\n    }else {\n        _arrowPosition = width - _cornerRaius - kArrowWidth;\n    }\n    \n    //如果不是根据关联视图，得算一次是否反向\n    if (!_refView) {\n        _isReverse = (originY + height > kScreenHeight - kDefaultMargin)?YES:NO;\n    }\n    \n    CGPoint  anchorPoint;\n    if (_isReverse) {\n        originY = _refPoint.y - height;\n        anchorPoint = CGPointMake(fabs(_arrowPosition) / width, 1);\n        _topMargin = 0;\n    }else{\n        anchorPoint = CGPointMake(fabs(_arrowPosition) / width, 0);\n        _topMargin = kArrowHeight;\n    }\n    originY += originY >= _refPoint.y ? _offset : -_offset;\n    \n    //保存原来的frame，防止设置锚点后偏移\n    self.layer.anchorPoint = anchorPoint;\n    self.frame = CGRectMake(originX, originY, width, height);\n}\n\n- (CAShapeLayer *)drawMaskLayer{\n    CAShapeLayer *maskLayer = [CAShapeLayer layer];\n    CGFloat bottomMargin = !_isReverse?0 :kArrowHeight;\n    \n    // 定出四个转角点\n    CGPoint topRightArcCenter = CGPointMake(self.width - _cornerRaius, _topMargin + _cornerRaius);\n    CGPoint topLeftArcCenter = CGPointMake(_cornerRaius, _topMargin + _cornerRaius);\n    CGPoint bottomRightArcCenter = CGPointMake(self.width - _cornerRaius, self.height - bottomMargin - _cornerRaius);\n    CGPoint bottomLeftArcCenter = CGPointMake(_cornerRaius, self.height - bottomMargin - _cornerRaius);\n    \n    UIBezierPath *path = [UIBezierPath bezierPath];\n    // 从左上倒角的下边开始画\n    [path moveToPoint: CGPointMake(0, _topMargin + _cornerRaius)];\n    [path addLineToPoint: CGPointMake(0, bottomLeftArcCenter.y)];\n    [path addArcWithCenter: bottomLeftArcCenter radius: _cornerRaius startAngle: -M_PI endAngle: -M_PI-M_PI_2 clockwise: NO];\n    \n    if (_isReverse) {\n        [path addLineToPoint: CGPointMake(_arrowPosition, self.height - kArrowHeight)];\n        [path addLineToPoint: CGPointMake(_arrowPosition + 0.5*kArrowWidth, self.height)];\n        [path addLineToPoint: CGPointMake(_arrowPosition + kArrowWidth, self.height - kArrowHeight)];\n    }\n    [path addLineToPoint: CGPointMake(self.width - _cornerRaius, self.height - bottomMargin)];\n    [path addArcWithCenter: bottomRightArcCenter radius: _cornerRaius startAngle: -M_PI-M_PI_2 endAngle: -M_PI*2 clockwise: NO];\n    [path addLineToPoint: CGPointMake(self.width, self.height - bottomMargin + _cornerRaius)];\n    [path addArcWithCenter: topRightArcCenter radius: _cornerRaius startAngle: 0 endAngle: -M_PI_2 clockwise: NO];\n    \n    if (!_isReverse) {\n        [path addLineToPoint: CGPointMake(_arrowPosition + kArrowWidth, _topMargin)];\n        [path addLineToPoint: CGPointMake(_arrowPosition + 0.5 * kArrowWidth, 0)];\n        [path addLineToPoint: CGPointMake(_arrowPosition, _topMargin)];\n    }\n    \n    [path addLineToPoint: CGPointMake(_cornerRaius, _topMargin)];\n    [path addArcWithCenter: topLeftArcCenter radius: _cornerRaius startAngle: -M_PI_2 endAngle: -M_PI clockwise: NO];\n    [path closePath];\n    \n    maskLayer.path = path.CGPath;\n    return maskLayer;\n}\n- (void)setDefaultShadow{\n    self.layer.shadowOpacity = 0.5;\n    self.layer.shadowOffset = CGSizeMake(0, 0);\n    self.layer.shadowRadius = 5.0;\n}\n\n#pragma mark - <UITableViewDelegate,UITableViewDataSource>\n- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{\n    return _actions.count;\n}\n- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{\n    YCMenuCell *cell = [tableView dequeueReusableCellWithIdentifier:menuCellID forIndexPath:indexPath];\n    YCMenuAction *action = _actions[indexPath.row];\n    cell.backgroundColor = [UIColor clearColor];\n    cell.textLabel.font = _textFont;\n    cell.textLabel.textColor = _textColor;\n    cell.textLabel.text = action.title;\n    cell.separatorColor = _separatorColor;\n    cell.imageView.image = action.image?action.image:nil;\n    \n    if (indexPath.row == _actions.count - 1) {\n        cell.isShowSeparator = NO;\n    }\n    return cell;\n}\n- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{\n    [tableView deselectRowAtIndexPath:indexPath animated:YES];\n    if (_dismissOnselected) [self dismiss];\n    YCMenuAction *action = _actions[indexPath.row];\n    if (action.handler) {\n        action.handler(action);\n    }\n}\n\n#pragma mark - Setting&&Getting\n- (UITableView *)tableView{\n    if (!_tableView) {\n        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, _topMargin, self.width, self.height - kArrowHeight) style:UITableViewStylePlain];\n        _tableView.backgroundColor = [UIColor clearColor];\n        _tableView.delegate = self;\n        _tableView.dataSource = self;\n        _tableView.bounces = _actions.count > _maxDisplayCount? YES : NO;\n        _tableView.rowHeight = _menuCellHeight;\n        _tableView.tableFooterView = [UIView new];\n        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;\n        [_tableView registerClass:[YCMenuCell class] forCellReuseIdentifier:menuCellID];\n    }\n    return _tableView;\n}\n- (UIView *)bgView{\n    if (!_bgView) {\n        _bgView = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds];\n        _bgView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];\n        _bgView.alpha = 0.0f;\n        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismiss)];\n        [_bgView addGestureRecognizer:tap];\n    }\n    return _bgView;\n}\n\n- (UIView *)contentView{\n    if (!_contentView) {\n        _contentView = [[UIView alloc] initWithFrame:self.bounds];\n        _contentView.backgroundColor = _menuColor;\n        _contentView.layer.masksToBounds = YES;\n        [_contentView addSubview:self.tableView];\n    }\n    return _contentView;\n}\n#pragma mark - 设置属性\n- (void)setCornerRaius:(CGFloat)cornerRaius{\n    if (_cornerRaius == cornerRaius)return;\n    _cornerRaius = cornerRaius;\n    self.contentView.layer.mask = [self drawMaskLayer];\n}\n- (void)setMenuColor:(UIColor *)menuColor{\n    if ([_menuColor isEqual:menuColor]) return;\n    _menuColor = menuColor;\n    self.contentView.backgroundColor = menuColor;\n}\n- (void)setBackgroundColor:(UIColor *)backgroundColor{\n    if ([_menuColor isEqual:backgroundColor]) return;\n    _menuColor = backgroundColor;\n    self.contentView.backgroundColor = _menuColor;\n}\n- (void)setSeparatorColor:(UIColor *)separatorColor{\n    if ([_separatorColor isEqual:separatorColor]) return;\n    _separatorColor = separatorColor;\n    [self.tableView reloadData];\n}\n- (void)setMenuCellHeight:(CGFloat)menuCellHeight{\n    if (_menuCellHeight == menuCellHeight)return;\n    _menuCellHeight = menuCellHeight;\n    _needReload = YES;\n}\n- (void)setMaxDisplayCount:(NSInteger)maxDisplayCount{\n    if (_maxDisplayCount == maxDisplayCount)return;\n    _maxDisplayCount = maxDisplayCount;\n    _needReload = YES;\n}\n- (void)setIsShowShadow:(BOOL)isShowShadow{\n    if (_isShowShadow == isShowShadow)return;\n    _isShowShadow = isShowShadow;\n    if (!_isShowShadow) {\n        self.layer.shadowOpacity = 0.0;\n        self.layer.shadowOffset = CGSizeMake(0, 0);\n        self.layer.shadowRadius = 0.0;\n    }else{\n        [self setDefaultShadow];\n    }\n}\n- (void)setTextFont:(UIFont *)textFont{\n    if ([_textFont isEqual:textFont]) return;\n    _textFont = textFont;\n    [self.tableView reloadData];\n}\n- (void)setTextColor:(UIColor *)textColor{\n    if ([_textColor isEqual:textColor]) return;\n    _textColor = textColor;\n    [self.tableView reloadData];\n}\n- (void)setOffset:(CGFloat)offset{\n    if (_offset == offset) return;\n    _offset = offset;\n    if (_offset < 0.0f) {\n        _offset = 0.0f;\n    }\n    self.y += self.y >= _refPoint.y ? _offset : -_offset;\n}\n\n@end\n"
  },
  {
    "path": "YCMenuViewDemo/Demo/AppDelegate.h",
    "content": "//\n//  AppDelegate.h\n//  Demo\n//\n//  Created by 蔡亚超 on 2018/5/18.\n//  Copyright © 2018年 WellsCai. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property (strong, nonatomic) UIWindow *window;\n\n\n@end\n\n"
  },
  {
    "path": "YCMenuViewDemo/Demo/AppDelegate.m",
    "content": "//\n//  AppDelegate.m\n//  Demo\n//\n//  Created by 蔡亚超 on 2018/5/18.\n//  Copyright © 2018年 WellsCai. All rights reserved.\n//\n\n#import \"AppDelegate.h\"\n\n@interface AppDelegate ()\n\n@end\n\n@implementation AppDelegate\n\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n    // Override point for customization after application launch.\n    return YES;\n}\n\n\n- (void)applicationWillResignActive:(UIApplication *)application {\n    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.\n    // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.\n}\n\n\n- (void)applicationDidEnterBackground:(UIApplication *)application {\n    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.\n    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.\n}\n\n\n- (void)applicationWillEnterForeground:(UIApplication *)application {\n    // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.\n}\n\n\n- (void)applicationDidBecomeActive:(UIApplication *)application {\n    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.\n}\n\n\n- (void)applicationWillTerminate:(UIApplication *)application {\n    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.\n}\n\n\n@end\n"
  },
  {
    "path": "YCMenuViewDemo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"83.5x83.5\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ios-marketing\",\n      \"size\" : \"1024x1024\",\n      \"scale\" : \"1x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "YCMenuViewDemo/Demo/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "YCMenuViewDemo/Demo/Assets.xcassets/ic_filter_category_0.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"ic_filter_category_0.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"ic_filter_category_0@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "YCMenuViewDemo/Demo/Base.lproj/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13122.16\" systemVersion=\"17A277\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13104.12\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <viewLayoutGuide key=\"safeArea\" id=\"6Tk-OE-BBY\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "YCMenuViewDemo/Demo/Base.lproj/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13771\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"mnB-mr-yRr\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13772\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--Test View Controller-->\n        <scene sceneID=\"TFr-Tk-Cm9\">\n            <objects>\n                <viewController id=\"8RN-OU-PFQ\" customClass=\"TestViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"ole-HI-F6Y\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"VnO-gT-UA4\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"aFF-JF-cMI\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                        <subviews>\n                            <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aqe-mL-sZL\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"89\" width=\"103\" height=\"59\"/>\n                                <color key=\"backgroundColor\" red=\"0.0\" green=\"0.47843137250000001\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"59\" id=\"W5u-Kw-SGj\"/>\n                                    <constraint firstAttribute=\"width\" constant=\"103\" id=\"rcv-wg-hoU\"/>\n                                </constraints>\n                                <state key=\"normal\" title=\"点击按钮1\">\n                                    <color key=\"titleColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                </state>\n                                <connections>\n                                    <action selector=\"button1Click:\" destination=\"8RN-OU-PFQ\" eventType=\"touchUpInside\" id=\"d7w-bt-L5I\"/>\n                                </connections>\n                            </button>\n                            <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"knM-vp-oiI\">\n                                <rect key=\"frame\" x=\"212\" y=\"535\" width=\"103\" height=\"59\"/>\n                                <color key=\"backgroundColor\" red=\"0.0\" green=\"0.47843137250000001\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"103\" id=\"7V1-tJ-Z4F\"/>\n                                    <constraint firstAttribute=\"width\" constant=\"103\" id=\"7kZ-6l-6s9\"/>\n                                    <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"59\" id=\"hLB-gi-Ex8\"/>\n                                    <constraint firstAttribute=\"height\" constant=\"59\" id=\"sxW-K4-oar\"/>\n                                </constraints>\n                                <state key=\"normal\" title=\"点击按钮3\">\n                                    <color key=\"titleColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                </state>\n                                <connections>\n                                    <action selector=\"button3Click:\" destination=\"8RN-OU-PFQ\" eventType=\"touchUpInside\" id=\"1OU-t4-wy1\"/>\n                                </connections>\n                            </button>\n                            <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"SwS-kD-9KL\">\n                                <rect key=\"frame\" x=\"272\" y=\"65\" width=\"103\" height=\"59\"/>\n                                <color key=\"backgroundColor\" red=\"0.0\" green=\"0.47843137250000001\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"103\" id=\"ENa-ff-Ofa\"/>\n                                    <constraint firstAttribute=\"width\" relation=\"lessThanOrEqual\" constant=\"103\" id=\"KKI-b7-rhZ\"/>\n                                    <constraint firstAttribute=\"width\" constant=\"103\" id=\"LOv-WE-vc4\"/>\n                                    <constraint firstAttribute=\"height\" constant=\"59\" id=\"Tuz-PH-2aq\"/>\n                                    <constraint firstAttribute=\"height\" relation=\"lessThanOrEqual\" constant=\"59\" id=\"WgR-il-l6B\"/>\n                                    <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"59\" id=\"h2D-sj-XvF\"/>\n                                </constraints>\n                                <state key=\"normal\" title=\"点击按钮2\">\n                                    <color key=\"titleColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                </state>\n                                <connections>\n                                    <action selector=\"button2Click:\" destination=\"8RN-OU-PFQ\" eventType=\"touchUpInside\" id=\"yEE-Uv-LQ6\"/>\n                                </connections>\n                            </button>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"knM-vp-oiI\" secondAttribute=\"trailing\" constant=\"60\" id=\"9sr-VH-IqG\"/>\n                            <constraint firstItem=\"aqe-mL-sZL\" firstAttribute=\"top\" secondItem=\"ole-HI-F6Y\" secondAttribute=\"bottom\" constant=\"25\" id=\"HE6-QA-4SN\"/>\n                            <constraint firstItem=\"VnO-gT-UA4\" firstAttribute=\"top\" secondItem=\"knM-vp-oiI\" secondAttribute=\"bottom\" constant=\"73\" id=\"P9c-op-Low\"/>\n                            <constraint firstItem=\"aqe-mL-sZL\" firstAttribute=\"leading\" secondItem=\"aFF-JF-cMI\" secondAttribute=\"leading\" id=\"s57-cc-pbw\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"SwS-kD-9KL\" secondAttribute=\"trailing\" id=\"tqg-2P-gJq\"/>\n                            <constraint firstItem=\"SwS-kD-9KL\" firstAttribute=\"top\" secondItem=\"ole-HI-F6Y\" secondAttribute=\"bottom\" constant=\"1\" id=\"zjL-2r-oYR\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"wKO-Q8-MDa\"/>\n                    </view>\n                    <navigationItem key=\"navigationItem\" id=\"nat-ll-kZD\">\n                        <barButtonItem key=\"rightBarButtonItem\" title=\"菜单\" id=\"KrR-R9-H2t\">\n                            <connections>\n                                <action selector=\"buttonItemClick:\" destination=\"8RN-OU-PFQ\" id=\"NGv-vh-K0T\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"2mt-yr-ecw\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1508\" y=\"322\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"me1-V0-CbB\">\n            <objects>\n                <navigationController automaticallyAdjustsScrollViewInsets=\"NO\" id=\"mnB-mr-yRr\" sceneMemberID=\"viewController\">\n                    <toolbarItems/>\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"mpu-MJ-iXB\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <nil name=\"viewControllers\"/>\n                    <connections>\n                        <segue destination=\"8RN-OU-PFQ\" kind=\"relationship\" relationship=\"rootViewController\" id=\"TOa-Cr-i7b\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Vhq-Qm-8ey\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"850\" y=\"323\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "YCMenuViewDemo/Demo/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "YCMenuViewDemo/Demo/TestViewController.h",
    "content": "//\n//  TestViewController.h\n//  DOPdemo\n//\n//  Created by 蔡亚超 on 2018/8/29.\n//  Copyright © 2018年 tanyang. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface TestViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "YCMenuViewDemo/Demo/TestViewController.m",
    "content": "//\n//  TestViewController.m\n//  DOPdemo\n//\n//  Created by 蔡亚超 on 2018/8/29.\n//  Copyright © 2018年 tanyang. All rights reserved.\n//\n\n#import \"TestViewController.h\"\n#import \"YCMenuView.h\"\n@interface TestViewController ()\n@property(nonatomic,strong)NSArray      *arr;\n@property(nonatomic,strong)YCMenuView   *mView;\n@end\n\n@implementation TestViewController\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    UIImage *image = [UIImage imageNamed:@\"ic_filter_category_0\"];\n    // Do any additional setup after loading the view.\n    YCMenuAction *action = [YCMenuAction actionWithTitle:@\"首页\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    YCMenuAction *action1 = [YCMenuAction actionWithTitle:@\"个人\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    YCMenuAction *action2 = [YCMenuAction actionWithTitle:@\"最新\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    YCMenuAction *action3 = [YCMenuAction actionWithTitle:@\"搜索页\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    YCMenuAction *action4 = [YCMenuAction actionWithTitle:@\"新闻页\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    \n    self.arr = @[action,action1,action2,action3,action4,action,action1,action2];\n}\n\n- (void)didReceiveMemoryWarning {\n    [super didReceiveMemoryWarning];\n    // Dispose of any resources that can be recreated.\n    \n    \n}\n\n- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{\n    UITouch *touch = touches.anyObject;\n    CGPoint P = [touch locationInView:self.view];\n    \n    // 创建\n    YCMenuView *view = [YCMenuView menuWithActions:self.arr width:140 atPoint:P];\n    self.mView = view;\n    \n    // 自定义设置\n    view.menuColor = [UIColor whiteColor];\n    view.separatorColor = [UIColor blueColor];\n    view.maxDisplayCount = 20;\n    view.offset = 100;\n    view.textColor = [UIColor blueColor];\n    view.textFont = [UIFont boldSystemFontOfSize:18];\n    view.menuCellHeight = 50;\n    view.dismissOnselected = YES;\n    view.dismissOnTouchOutside = YES;\n    view.backgroundColor = [UIColor redColor];\n    \n    // 显示\n    [view show];\n    \n    \n}\n- (IBAction)buttonItemClick:(UIBarButtonItem *)sender {\n    YCMenuView *view = [YCMenuView menuWithActions:self.arr width:140 relyonView:sender];\n    view.maxDisplayCount = 7;\n\n    [view show];\n\n    self.mView = view;\n    \n}\n- (IBAction)button1Click:(UIButton *)sender {\n    YCMenuView *view = [YCMenuView menuWithActions:self.arr width:140 relyonView:sender];\n    view.maxDisplayCount = 7;\n\n    [view show];\n}\n- (IBAction)button2Click:(UIButton *)sender {\n    YCMenuView *view = [YCMenuView menuWithActions:self.arr width:140 relyonView:sender];\n    view.maxDisplayCount = 7;\n\n    [view show];\n}\n- (IBAction)button3Click:(UIButton *)sender {\n    YCMenuView *view = [YCMenuView menuWithActions:self.arr width:140 relyonView:sender];\n    view.maxDisplayCount = 8;\n\n    [view show];\n}\n\n\n/*\n#pragma mark - Navigation\n\n// In a storyboard-based application, you will often want to do a little preparation before navigation\n- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {\n    // Get the new view controller using [segue destinationViewController].\n    // Pass the selected object to the new view controller.\n}\n*/\n\n@end\n"
  },
  {
    "path": "YCMenuViewDemo/Demo/ViewController.h",
    "content": "//\n//  ViewController.h\n//  Demo\n//\n//  Created by 蔡亚超 on 2018/5/18.\n//  Copyright © 2018年 WellsCai. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface ViewController : UIViewController\n\n\n@end\n\n"
  },
  {
    "path": "YCMenuViewDemo/Demo/ViewController.m",
    "content": "//\n//  ViewController.m\n//  Demo\n//\n//  Created by 蔡亚超 on 2018/5/18.\n//  Copyright © 2018年 WellsCai. All rights reserved.\n//\n\n#import \"ViewController.h\"\n\n\n@interface ViewController ()\n\n@end\n\n@implementation ViewController\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    // Do any additional setup after loading the view, typically from a nib.\n}\n\n@end\n"
  },
  {
    "path": "YCMenuViewDemo/Demo/YCMenuView.h",
    "content": "//\n//  YCMenuView.h\n//  Demo\n//\n//  Created by 蔡亚超 on 2018/8/28.\n//  Copyright © 2018年 WellsCai. All rights reserved.\n//  github地址：https://github.com/WellsYC/YCMenuView\n//  简书地址：https://www.jianshu.com/u/f853cbc68abb\n\n#import <UIKit/UIKit.h>\n\n@class YCMenuAction;\n@interface YCMenuView : UIView\n//默认倒角   default = 5.0\n@property (nonatomic,assign) CGFloat                        cornerRaius;\n//设置分割线颜色 default = 灰色\n@property (nonatomic,strong) UIColor                       *separatorColor;\n//设置菜单颜色  default = 白色（也可以通过BackgroundColor设置）\n@property (nonatomic,strong) UIColor                       *menuColor;\n//设置菜单单元格高度  default = 44\n@property (nonatomic,assign) CGFloat                        menuCellHeight;\n//最大显示数量  default = 5\n@property (nonatomic,assign) NSInteger                      maxDisplayCount;\n//是否显示阴影 default = YES(默认设置，也可以自己通过layer属性设置)\n@property (nonatomic,assign,getter = isShadowShowing)BOOL   isShowShadow;\n//选择菜单选项后消失 default = YES\n@property (nonatomic,assign)  BOOL                          dismissOnselected;\n//点击菜单外消失 default = YES\n@property (nonatomic,assign)  BOOL                          dismissOnTouchOutside;\n//设置字体大小 default = 15\n@property (nonatomic,assign)  UIFont                        *textFont;\n//设置字体颜色 default = 黑色\n@property (nonatomic,strong)  UIColor                       *textColor;\n//设置偏移距离 default = 0（与触摸点在Y轴上的偏移）\n@property (nonatomic,assign)  CGFloat                       offset;\n\n// 从关联点创建\n+ (instancetype)menuWithActions:(NSArray<YCMenuAction *> *)actions width:(CGFloat)width atPoint:(CGPoint)point;\n// 从关联视图创建（可以是UIView和UIBarButtonItem）\n+ (instancetype)menuWithActions:(NSArray<YCMenuAction *> *)actions width:(CGFloat)width relyonView:(id)view;\n- (void)show;\n- (instancetype)init NS_UNAVAILABLE;\n+ (instancetype)new NS_UNAVAILABLE;\n@end\n\n@interface YCMenuAction : NSObject\n@property (nonatomic, readonly) NSString      *title;\n@property (nonatomic, readonly) UIImage       *image;\n@property (nonatomic,copy, readonly) void (^handler)(YCMenuAction *action);\n+ (instancetype)actionWithTitle:(NSString *)title image:(UIImage *)image handler:(void (^)(YCMenuAction *action))handler;\n- (instancetype)init NS_UNAVAILABLE;\n+ (instancetype)new NS_UNAVAILABLE;\n@end\n\n\n\n\n"
  },
  {
    "path": "YCMenuViewDemo/Demo/YCMenuView.m",
    "content": "//\n//  YCMenuView.m\n//  Demo\n//\n//  Created by 蔡亚超 on 2018/8/28.\n//  Copyright © 2018年 WellsCai. All rights reserved.\n//  github地址：https://github.com/WellsYC/YCMenuView\n//  简书地址：https://www.jianshu.com/u/f853cbc68abb\n\n\n#define kScreenWidth               [UIScreen mainScreen].bounds.size.width\n#define kScreenHeight              [UIScreen mainScreen].bounds.size.height\n#define kMainWindow                [UIApplication sharedApplication].keyWindow\n\n#define kArrowWidth          15\n#define kArrowHeight         10\n#define kDefaultMargin       10\n#define kAnimationTime       0.25\n\n#import \"YCMenuView.h\"\n\n@interface UIView (YCFrame)\n@property (nonatomic, assign) CGFloat x;\n@property (nonatomic, assign) CGFloat y;\n@property (nonatomic, assign) CGPoint origin;\n\n@property (nonatomic, assign) CGFloat centerX;\n@property (nonatomic, assign) CGFloat centerY;\n\n@property (nonatomic, assign) CGFloat width;\n@property (nonatomic, assign) CGFloat height;\n@property (nonatomic, assign) CGSize  size;\n@end\n\n@implementation UIView (YCFrame)\n- (CGFloat)x\n{\n    return self.frame.origin.x;\n}\n- (void)setX:(CGFloat)value\n{\n    CGRect frame = self.frame;\n    frame.origin.x = value;\n    self.frame = frame;\n}\n- (CGFloat)y\n{\n    return self.frame.origin.y;\n}\n- (void)setY:(CGFloat)value\n{\n    CGRect frame = self.frame;\n    frame.origin.y = value;\n    self.frame = frame;\n}\n- (CGPoint)origin\n{\n    return self.frame.origin;\n}\n- (void)setOrigin:(CGPoint)origin\n{\n    CGRect frame = self.frame;\n    frame.origin = origin;\n    self.frame = frame;\n}\n- (CGFloat)centerX\n{\n    return self.center.x;\n}\n- (void)setCenterX:(CGFloat)centerX\n{\n    CGPoint center = self.center;\n    center.x = centerX;\n    self.center = center;\n}\n- (CGFloat)centerY\n{\n    return self.center.y;\n}\n- (void)setCenterY:(CGFloat)centerY\n{\n    CGPoint center = self.center;\n    center.y = centerY;\n    self.center = center;\n}\n- (CGFloat)width\n{\n    return self.frame.size.width;\n}\n- (void)setWidth:(CGFloat)width\n{\n    CGRect frame = self.frame;\n    frame.size.width = width;\n    self.frame = frame;\n}\n- (CGFloat)height\n{\n    return self.frame.size.height;\n}\n- (void)setHeight:(CGFloat)height\n{\n    CGRect frame = self.frame;\n    frame.size.height = height;\n    self.frame = frame;\n}\n- (CGSize)size\n{\n    return self.frame.size;\n}\n- (void)setSize:(CGSize)size\n{\n    CGRect frame = self.frame;\n    frame.size = size;\n    self.frame = frame;\n}\n@end\n\n@interface YCMenuCell : UITableViewCell\n@property (nonatomic,assign) BOOL         isShowSeparator;\n@property (nonatomic,strong) UIColor    * separatorLineColor;\n@end\n@implementation YCMenuCell\n- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{\n    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {\n        _isShowSeparator = YES;\n        _separatorLineColor = [UIColor lightGrayColor];\n    }\n    return self;\n}\n\n- (void)setSeparatorLineColor:(UIColor *)separatorLineColor{\n    _separatorLineColor = separatorLineColor;\n    [self setNeedsDisplay];\n}\n\n- (void)setIsShowSeparator:(BOOL)isShowSeparator{\n    _isShowSeparator = isShowSeparator;\n    [self setNeedsDisplay];\n}\n- (void)drawRect:(CGRect)rect{\n    if (!_isShowSeparator)return;\n    UIBezierPath *path = [UIBezierPath bezierPathWithRect:CGRectMake(0, rect.size.height - 0.5, rect.size.width, 0.5)];\n    [_separatorLineColor setFill];\n    [path fillWithBlendMode:kCGBlendModeNormal alpha:1.0f];\n    [path closePath];\n}\n@end\n\n\n@interface YCMenuAction()\n@property (nonatomic) NSString      *title;\n@property (nonatomic) UIImage       *image;\n@property (copy, nonatomic)void (^handler)(YCMenuAction *);\n@end\n@implementation YCMenuAction\n+ (instancetype)actionWithTitle:(NSString *)title image:(UIImage *)image handler:(void (^)(YCMenuAction *))handler{\n    YCMenuAction *action = [[YCMenuAction alloc] initWithTitle:title image:image handler:handler];\n    return action;\n}\n- (instancetype)initWithTitle:(NSString *)title image:(UIImage *)image handler:(void (^)(YCMenuAction *))handler{\n    if (self = [super init]) {\n        _title = title;\n        _image = image;\n        _handler = [handler copy];\n    }\n    return self;\n}\n@end\n\n\n@interface YCMenuView()<UITableViewDelegate,UITableViewDataSource>\n{\n    CGPoint          _refPoint;\n    UIView          *_refView;\n    CGFloat          _menuWidth;\n    \n    CGFloat         _arrowPosition; // 三角底部的起始点x\n    CGFloat         _topMargin;\n    BOOL            _isReverse; // 是否反向\n    BOOL            _needReload; //是否需要刷新\n}\n@property(nonatomic,copy) NSArray<YCMenuAction *>   *actions;\n@property(nonatomic,strong)UITableView              *tableView;\n@property(nonatomic,strong)UIView                   *contentView;\n@property(nonatomic,strong)UIView                   *bgView;\n\n@end\n\nstatic NSString *const menuCellID = @\"YCMenuCell\";\n@implementation YCMenuView\n\n+ (instancetype)menuWithActions:(NSArray<YCMenuAction *> *)actions width:(CGFloat)width atPoint:(CGPoint)point{\n    NSAssert(width>0.0f, @\"width要大于0\");\n    YCMenuView *menu = [[YCMenuView alloc] initWithActions:actions width:width atPoint:point];\n    return menu;\n}\n+ (instancetype)menuWithActions:(NSArray<YCMenuAction *> *)actions width:(CGFloat)width relyonView:(id)view{\n    NSAssert(width>0.0f, @\"width要大于0\");\n    NSAssert([view isKindOfClass:[UIView class]]||[view isKindOfClass:[UIBarButtonItem class]], @\"relyonView必须是UIView或UIBarButtonItem\");\n    YCMenuView *menu = [[YCMenuView alloc] initWithActions:actions width:width relyonView:view];\n    return menu;\n}\n\n- (instancetype)initWithActions:(NSArray<YCMenuAction *> *)actions width:(CGFloat)width atPoint:(CGPoint)point{\n    if (self = [super init]) {\n        _actions = [actions copy];\n        _refPoint = point;\n        _menuWidth = width;\n        [self defaultConfiguration];\n        [self setupSubView];\n    }\n    return self;\n}\n\n- (instancetype)initWithActions:(NSArray<YCMenuAction *> *)actions width:(CGFloat)width relyonView:(id)view{\n    if (self = [super init]) {\n        // 针对UIBarButtonItem做的处理\n        if ([view isKindOfClass:[UIBarButtonItem class]]) {\n            UIView *bgView = [view valueForKey:@\"_view\"];\n            _refView = bgView;\n        }else{\n            _refView = view;\n        }\n        _actions = [actions copy];\n        _menuWidth = width;\n        [self defaultConfiguration];\n        [self setupSubView];\n    }\n    return self;\n}\n\n- (void)defaultConfiguration{\n    self.alpha = 0.0f;\n    [self setDefaultShadow];\n    \n    _cornerRaius = 5.0f;\n    _separatorColor = [UIColor lightGrayColor];\n\n    _menuColor = [UIColor whiteColor];\n    _menuCellHeight = 44.0f;\n    _maxDisplayCount = 5;\n    _isShowShadow = YES;\n    _dismissOnselected = YES;\n    _dismissOnTouchOutside = YES;\n    \n    _textColor = [UIColor blackColor];\n    _textFont = [UIFont systemFontOfSize:15.0f];\n    _offset = 0.0f;\n}\n\n- (void)setupSubView{\n    [self calculateArrowAndFrame];\n    [self setupMaskLayer];\n    [self addSubview:self.contentView];\n}\n\n- (void)reloadData{\n    [self.contentView removeFromSuperview];\n    [self.tableView removeFromSuperview];\n    self.contentView = nil;\n    self.tableView = nil;\n    [self setupSubView];\n}\n\n- (CGPoint)getRefPoint{\n    CGRect absoluteRect = [_refView convertRect:_refView.bounds toView:kMainWindow];\n    CGPoint refPoint;\n    CGFloat menuHeight = (_actions.count > _maxDisplayCount) ? _maxDisplayCount * _menuCellHeight + kArrowHeight: _actions.count * _menuCellHeight + kArrowHeight;\n    if (absoluteRect.origin.y + absoluteRect.size.height +  menuHeight > kScreenHeight - 10) {\n        refPoint = CGPointMake(absoluteRect.origin.x + absoluteRect.size.width / 2, absoluteRect.origin.y);\n        _isReverse = YES;\n    }else{\n        refPoint = CGPointMake(absoluteRect.origin.x + absoluteRect.size.width / 2, absoluteRect.origin.y + absoluteRect.size.height);\n        _isReverse = NO;\n    }\n    return refPoint;\n}\n\n- (void)show{\n    // 自定义设置统一在这边刷新一次\n    if (_needReload) [self reloadData];\n    \n    [kMainWindow addSubview: self.bgView];\n    [kMainWindow addSubview: self];\n    self.layer.affineTransform = CGAffineTransformMakeScale(0.1, 0.1);\n    [UIView animateWithDuration: kAnimationTime animations:^{\n        self.layer.affineTransform = CGAffineTransformIdentity;\n        self.alpha = 1.0f;\n        self.bgView.alpha = 1.0f;\n    }];\n}\n\n- (void)dismiss{\n    if (!_dismissOnTouchOutside) return;\n    [UIView animateWithDuration: kAnimationTime animations:^{\n        self.layer.affineTransform = CGAffineTransformMakeScale(0.1, 0.1);\n        self.alpha = 0.0f;\n        self.bgView.alpha = 0.0f;\n    } completion:^(BOOL finished) {\n        self.layer.affineTransform = CGAffineTransformIdentity;\n        [self removeFromSuperview];\n        [self.bgView removeFromSuperview];\n    }];\n}\n\n#pragma mark - Private\n- (void)setupMaskLayer{\n    CAShapeLayer *layer = [self drawMaskLayer];\n    self.contentView.layer.mask = layer;\n}\n\n- (void)calculateArrowAndFrame{\n    if (_refView) {\n        _refPoint = [self getRefPoint];\n    }\n    \n    CGFloat originX;\n    CGFloat originY;\n    CGFloat width;\n    CGFloat height;\n    \n    width = _menuWidth;\n    height = (_actions.count > _maxDisplayCount) ? _maxDisplayCount * _menuCellHeight + kArrowHeight: _actions.count * _menuCellHeight + kArrowHeight;\n    // 默认在中间\n    _arrowPosition = 0.5 * width - 0.5 * kArrowWidth;\n    \n    // 设置出menu的x和y（默认情况）\n    originX = _refPoint.x - _arrowPosition - 0.5 * kArrowWidth;\n    originY = _refPoint.y;\n    \n    // 考虑向左右展示不全的情况，需要反向展示\n    if (originX + width > kScreenWidth - 10) {\n        originX = kScreenWidth - kDefaultMargin - width;\n    }else if (originX < 10) {\n        //向上的情况间距也至少是kDefaultMargin\n        originX = kDefaultMargin;\n    }\n    \n    //设置三角形的起始点\n    if ((_refPoint.x <= originX + width - _cornerRaius) && (_refPoint.x >= originX + _cornerRaius)) {\n        _arrowPosition = _refPoint.x - originX - 0.5 * kArrowWidth;\n    }else if (_refPoint.x < originX + _cornerRaius) {\n        _arrowPosition = _cornerRaius;\n    }else {\n        _arrowPosition = width - _cornerRaius - kArrowWidth;\n    }\n    \n    //如果不是根据关联视图，得算一次是否反向\n    if (!_refView) {\n        _isReverse = (originY + height > kScreenHeight - kDefaultMargin)?YES:NO;\n    }\n    \n    CGPoint  anchorPoint;\n    if (_isReverse) {\n        originY = _refPoint.y - height;\n        anchorPoint = CGPointMake(fabs(_arrowPosition) / width, 1);\n        _topMargin = 0;\n    }else{\n        anchorPoint = CGPointMake(fabs(_arrowPosition) / width, 0);\n        _topMargin = kArrowHeight;\n    }\n    originY += originY >= _refPoint.y ? _offset : -_offset;\n    \n    //保存原来的frame，防止设置锚点后偏移\n    self.layer.anchorPoint = anchorPoint;\n    self.frame = CGRectMake(originX, originY, width, height);\n}\n\n- (CAShapeLayer *)drawMaskLayer{\n    CAShapeLayer *maskLayer = [CAShapeLayer layer];\n    CGFloat bottomMargin = !_isReverse?0 :kArrowHeight;\n    \n    // 定出四个转角点\n    CGPoint topRightArcCenter = CGPointMake(self.width - _cornerRaius, _topMargin + _cornerRaius);\n    CGPoint topLeftArcCenter = CGPointMake(_cornerRaius, _topMargin + _cornerRaius);\n    CGPoint bottomRightArcCenter = CGPointMake(self.width - _cornerRaius, self.height - bottomMargin - _cornerRaius);\n    CGPoint bottomLeftArcCenter = CGPointMake(_cornerRaius, self.height - bottomMargin - _cornerRaius);\n    \n    UIBezierPath *path = [UIBezierPath bezierPath];\n    // 从左上倒角的下边开始画\n    [path moveToPoint: CGPointMake(0, _topMargin + _cornerRaius)];\n    [path addLineToPoint: CGPointMake(0, bottomLeftArcCenter.y)];\n    [path addArcWithCenter: bottomLeftArcCenter radius: _cornerRaius startAngle: -M_PI endAngle: -M_PI-M_PI_2 clockwise: NO];\n    \n    if (_isReverse) {\n        [path addLineToPoint: CGPointMake(_arrowPosition, self.height - kArrowHeight)];\n        [path addLineToPoint: CGPointMake(_arrowPosition + 0.5*kArrowWidth, self.height)];\n        [path addLineToPoint: CGPointMake(_arrowPosition + kArrowWidth, self.height - kArrowHeight)];\n    }\n    [path addLineToPoint: CGPointMake(self.width - _cornerRaius, self.height - bottomMargin)];\n    [path addArcWithCenter: bottomRightArcCenter radius: _cornerRaius startAngle: -M_PI-M_PI_2 endAngle: -M_PI*2 clockwise: NO];\n    [path addLineToPoint: CGPointMake(self.width, self.height - bottomMargin + _cornerRaius)];\n    [path addArcWithCenter: topRightArcCenter radius: _cornerRaius startAngle: 0 endAngle: -M_PI_2 clockwise: NO];\n    \n    if (!_isReverse) {\n        [path addLineToPoint: CGPointMake(_arrowPosition + kArrowWidth, _topMargin)];\n        [path addLineToPoint: CGPointMake(_arrowPosition + 0.5 * kArrowWidth, 0)];\n        [path addLineToPoint: CGPointMake(_arrowPosition, _topMargin)];\n    }\n    \n    [path addLineToPoint: CGPointMake(_cornerRaius, _topMargin)];\n    [path addArcWithCenter: topLeftArcCenter radius: _cornerRaius startAngle: -M_PI_2 endAngle: -M_PI clockwise: NO];\n    [path closePath];\n    \n    maskLayer.path = path.CGPath;\n    return maskLayer;\n}\n- (void)setDefaultShadow{\n    self.layer.shadowOpacity = 0.5;\n    self.layer.shadowOffset = CGSizeMake(0, 0);\n    self.layer.shadowRadius = 5.0;\n}\n\n#pragma mark - <UITableViewDelegate,UITableViewDataSource>\n- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{\n    return _actions.count;\n}\n- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{\n    YCMenuCell *cell = [tableView dequeueReusableCellWithIdentifier:menuCellID forIndexPath:indexPath];\n    YCMenuAction *action = _actions[indexPath.row];\n    cell.backgroundColor = [UIColor clearColor];\n    cell.textLabel.font = _textFont;\n    cell.textLabel.textColor = _textColor;\n    cell.textLabel.text = action.title;\n\n    cell.separatorLineColor = _separatorColor;\n    cell.imageView.image = action.image?action.image:nil;\n    \n    if (indexPath.row == _actions.count - 1) {\n        cell.isShowSeparator = NO;\n    }\n    return cell;\n}\n- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{\n    [tableView deselectRowAtIndexPath:indexPath animated:YES];\n    if (_dismissOnselected) [self dismiss];\n    YCMenuAction *action = _actions[indexPath.row];\n    if (action.handler) {\n        action.handler(action);\n    }\n}\n\n#pragma mark - Setting&&Getting\n- (UITableView *)tableView{\n    if (!_tableView) {\n        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, _topMargin, self.width, self.height - kArrowHeight) style:UITableViewStylePlain];\n        _tableView.backgroundColor = [UIColor clearColor];\n        _tableView.delegate = self;\n        _tableView.dataSource = self;\n        _tableView.bounces = _actions.count > _maxDisplayCount? YES : NO;\n        _tableView.rowHeight = _menuCellHeight;\n        _tableView.tableFooterView = [UIView new];\n        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;\n        [_tableView registerClass:[YCMenuCell class] forCellReuseIdentifier:menuCellID];\n    }\n    return _tableView;\n}\n- (UIView *)bgView{\n    if (!_bgView) {\n        _bgView = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds];\n        _bgView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];\n        _bgView.alpha = 0.0f;\n        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismiss)];\n        [_bgView addGestureRecognizer:tap];\n    }\n    return _bgView;\n}\n\n- (UIView *)contentView{\n    if (!_contentView) {\n        _contentView = [[UIView alloc] initWithFrame:self.bounds];\n        _contentView.backgroundColor = _menuColor;\n        _contentView.layer.masksToBounds = YES;\n        [_contentView addSubview:self.tableView];\n    }\n    return _contentView;\n}\n#pragma mark - 设置属性\n- (void)setCornerRaius:(CGFloat)cornerRaius{\n    if (_cornerRaius == cornerRaius)return;\n    _cornerRaius = cornerRaius;\n    self.contentView.layer.mask = [self drawMaskLayer];\n}\n- (void)setMenuColor:(UIColor *)menuColor{\n    if ([_menuColor isEqual:menuColor]) return;\n    _menuColor = menuColor;\n    self.contentView.backgroundColor = menuColor;\n}\n- (void)setBackgroundColor:(UIColor *)backgroundColor{\n    if ([_menuColor isEqual:backgroundColor]) return;\n    _menuColor = backgroundColor;\n    self.contentView.backgroundColor = _menuColor;\n}\n- (void)setSeparatorColor:(UIColor *)separatorColor{\n    if ([_separatorColor isEqual:separatorColor]) return;\n    _separatorColor = separatorColor;\n    [self.tableView reloadData];\n}\n- (void)setMenuCellHeight:(CGFloat)menuCellHeight{\n    if (_menuCellHeight == menuCellHeight)return;\n    _menuCellHeight = menuCellHeight;\n    _needReload = YES;\n}\n- (void)setMaxDisplayCount:(NSInteger)maxDisplayCount{\n    if (_maxDisplayCount == maxDisplayCount)return;\n    _maxDisplayCount = maxDisplayCount;\n    _needReload = YES;\n}\n- (void)setIsShowShadow:(BOOL)isShowShadow{\n    if (_isShowShadow == isShowShadow)return;\n    _isShowShadow = isShowShadow;\n    if (!_isShowShadow) {\n        self.layer.shadowOpacity = 0.0;\n        self.layer.shadowOffset = CGSizeMake(0, 0);\n        self.layer.shadowRadius = 0.0;\n    }else{\n        [self setDefaultShadow];\n    }\n}\n- (void)setTextFont:(UIFont *)textFont{\n    if ([_textFont isEqual:textFont]) return;\n    _textFont = textFont;\n    [self.tableView reloadData];\n}\n- (void)setTextColor:(UIColor *)textColor{\n    if ([_textColor isEqual:textColor]) return;\n    _textColor = textColor;\n    [self.tableView reloadData];\n}\n- (void)setOffset:(CGFloat)offset{\n    if (_offset == offset) return;\n    _offset = offset;\n    if (_offset < 0.0f) {\n        _offset = 0.0f;\n    }\n    self.y += self.y >= _refPoint.y ? _offset : -_offset;\n}\n\n@end\n"
  },
  {
    "path": "YCMenuViewDemo/Demo/main.m",
    "content": "//\n//  main.m\n//  Demo\n//\n//  Created by 蔡亚超 on 2018/5/18.\n//  Copyright © 2018年 WellsCai. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#import \"AppDelegate.h\"\n\nint main(int argc, char * argv[]) {\n    @autoreleasepool {\n        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));\n    }\n}\n"
  },
  {
    "path": "YCMenuViewDemo/Demo.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 48;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\tE5160E392137967000EE6A44 /* YCMenuView.m in Sources */ = {isa = PBXBuildFile; fileRef = E5160E372137967000EE6A44 /* YCMenuView.m */; };\n\t\tE5160E3C2137968000EE6A44 /* TestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E5160E3B2137968000EE6A44 /* TestViewController.m */; };\n\t\tE5DE2D6F20AE59A300CA20B1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E5DE2D6E20AE59A300CA20B1 /* AppDelegate.m */; };\n\t\tE5DE2D7220AE59A300CA20B1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E5DE2D7120AE59A300CA20B1 /* ViewController.m */; };\n\t\tE5DE2D7520AE59A300CA20B1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E5DE2D7320AE59A300CA20B1 /* Main.storyboard */; };\n\t\tE5DE2D7720AE59A300CA20B1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E5DE2D7620AE59A300CA20B1 /* Assets.xcassets */; };\n\t\tE5DE2D7A20AE59A300CA20B1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E5DE2D7820AE59A300CA20B1 /* LaunchScreen.storyboard */; };\n\t\tE5DE2D7D20AE59A300CA20B1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E5DE2D7C20AE59A300CA20B1 /* main.m */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\tE5160E372137967000EE6A44 /* YCMenuView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YCMenuView.m; sourceTree = \"<group>\"; };\n\t\tE5160E382137967000EE6A44 /* YCMenuView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YCMenuView.h; sourceTree = \"<group>\"; };\n\t\tE5160E3A2137967F00EE6A44 /* TestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestViewController.h; sourceTree = \"<group>\"; };\n\t\tE5160E3B2137968000EE6A44 /* TestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestViewController.m; sourceTree = \"<group>\"; };\n\t\tE5DE2D6A20AE59A300CA20B1 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tE5DE2D6D20AE59A300CA20B1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = \"<group>\"; };\n\t\tE5DE2D6E20AE59A300CA20B1 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = \"<group>\"; };\n\t\tE5DE2D7020AE59A300CA20B1 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = \"<group>\"; };\n\t\tE5DE2D7120AE59A300CA20B1 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = \"<group>\"; };\n\t\tE5DE2D7420AE59A300CA20B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\tE5DE2D7620AE59A300CA20B1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\tE5DE2D7920AE59A300CA20B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\tE5DE2D7B20AE59A300CA20B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\tE5DE2D7C20AE59A300CA20B1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\tE5DE2D6720AE59A300CA20B1 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\tE5DE2D6120AE59A300CA20B1 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tE5DE2D6C20AE59A300CA20B1 /* Demo */,\n\t\t\t\tE5DE2D6B20AE59A300CA20B1 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tE5DE2D6B20AE59A300CA20B1 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tE5DE2D6A20AE59A300CA20B1 /* Demo.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tE5DE2D6C20AE59A300CA20B1 /* Demo */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tE5160E382137967000EE6A44 /* YCMenuView.h */,\n\t\t\t\tE5160E372137967000EE6A44 /* YCMenuView.m */,\n\t\t\t\tE5160E3A2137967F00EE6A44 /* TestViewController.h */,\n\t\t\t\tE5160E3B2137968000EE6A44 /* TestViewController.m */,\n\t\t\t\tE5DE2D6D20AE59A300CA20B1 /* AppDelegate.h */,\n\t\t\t\tE5DE2D6E20AE59A300CA20B1 /* AppDelegate.m */,\n\t\t\t\tE5DE2D7020AE59A300CA20B1 /* ViewController.h */,\n\t\t\t\tE5DE2D7120AE59A300CA20B1 /* ViewController.m */,\n\t\t\t\tE5DE2D7320AE59A300CA20B1 /* Main.storyboard */,\n\t\t\t\tE5DE2D7620AE59A300CA20B1 /* Assets.xcassets */,\n\t\t\t\tE5DE2D7820AE59A300CA20B1 /* LaunchScreen.storyboard */,\n\t\t\t\tE5DE2D7B20AE59A300CA20B1 /* Info.plist */,\n\t\t\t\tE5DE2D7C20AE59A300CA20B1 /* main.m */,\n\t\t\t);\n\t\t\tpath = Demo;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\tE5DE2D6920AE59A300CA20B1 /* Demo */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = E5DE2D8020AE59A300CA20B1 /* Build configuration list for PBXNativeTarget \"Demo\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tE5DE2D6620AE59A300CA20B1 /* Sources */,\n\t\t\t\tE5DE2D6720AE59A300CA20B1 /* Frameworks */,\n\t\t\t\tE5DE2D6820AE59A300CA20B1 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = Demo;\n\t\t\tproductName = Demo;\n\t\t\tproductReference = E5DE2D6A20AE59A300CA20B1 /* Demo.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\tE5DE2D6220AE59A300CA20B1 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 0920;\n\t\t\t\tORGANIZATIONNAME = WellsCai;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\tE5DE2D6920AE59A300CA20B1 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = E5DE2D6520AE59A300CA20B1 /* Build configuration list for PBXProject \"Demo\" */;\n\t\t\tcompatibilityVersion = \"Xcode 8.0\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = E5DE2D6120AE59A300CA20B1;\n\t\t\tproductRefGroup = E5DE2D6B20AE59A300CA20B1 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\tE5DE2D6920AE59A300CA20B1 /* Demo */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\tE5DE2D6820AE59A300CA20B1 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tE5DE2D7A20AE59A300CA20B1 /* LaunchScreen.storyboard in Resources */,\n\t\t\t\tE5DE2D7720AE59A300CA20B1 /* Assets.xcassets in Resources */,\n\t\t\t\tE5DE2D7520AE59A300CA20B1 /* Main.storyboard in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\tE5DE2D6620AE59A300CA20B1 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tE5DE2D7220AE59A300CA20B1 /* ViewController.m in Sources */,\n\t\t\t\tE5DE2D7D20AE59A300CA20B1 /* main.m in Sources */,\n\t\t\t\tE5DE2D6F20AE59A300CA20B1 /* AppDelegate.m in Sources */,\n\t\t\t\tE5160E392137967000EE6A44 /* YCMenuView.m in Sources */,\n\t\t\t\tE5160E3C2137968000EE6A44 /* TestViewController.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\tE5DE2D7320AE59A300CA20B1 /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\tE5DE2D7420AE59A300CA20B1 /* Base */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tE5DE2D7820AE59A300CA20B1 /* LaunchScreen.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\tE5DE2D7920AE59A300CA20B1 /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\tE5DE2D7E20AE59A300CA20B1 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tE5DE2D7F20AE59A300CA20B1 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\tE5DE2D8120AE59A300CA20B1 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = S6X943LZML;\n\t\t\t\tINFOPLIST_FILE = Demo/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.ylz.Demo;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tE5DE2D8220AE59A300CA20B1 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = S6X943LZML;\n\t\t\t\tINFOPLIST_FILE = Demo/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.ylz.Demo;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\tE5DE2D6520AE59A300CA20B1 /* Build configuration list for PBXProject \"Demo\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tE5DE2D7E20AE59A300CA20B1 /* Debug */,\n\t\t\t\tE5DE2D7F20AE59A300CA20B1 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tE5DE2D8020AE59A300CA20B1 /* Build configuration list for PBXNativeTarget \"Demo\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tE5DE2D8120AE59A300CA20B1 /* Debug */,\n\t\t\t\tE5DE2D8220AE59A300CA20B1 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = E5DE2D6220AE59A300CA20B1 /* Project object */;\n}\n"
  },
  {
    "path": "YCMenuViewDemo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:Demo.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "YCMenuViewDemo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  }
]