Latest 1.1.3
Homepage https://github.com/DeanFs/YBPopupMenu
License MIT
Platforms ios 7.0, requires ARC
Authors

Fork 更新内容(from v1.1.2):

  1. 解决分割线隐藏位置错误问题;
  2. 增加属性,设置分割线颜色separatorColor;
  3. 增加属性,设置分割线内边距separatorInset;
  4. 增加属性,设置阴影透明度shadowOpacity,默认0.2;

pod安装Fork:

  • 只需在Podfile中加入pod 'DFYBPopupMenu'pod install即可

YBPopupMenu

  • 快速集成popupMenu

效果图

(演示效果)

cocoapods支持

  • 只需在Podfile中加入pod 'YBPopupMenu', '~> 1.1.2'pod install即可

最近更新

  • 开放部分私有属性,如titlesimages,tableView,minSpace等等
  • 点击回调方法有更新(旧的还可以用)
  • 增加可自定义Cell的回调,遇到奇葩需求可以自定义设置(具体使用方法可参考demo)

上次更新

  • 代码全部重构,不过完全兼容原先的API接口
  • 增加了YBPopupMenuPriorityDirection属性,可以设置箭头的第一优先级方向,当将要超过屏幕时会自动反转方向
  • 增加了rectCorner属性,可以自定义圆角(当反转时会自动镜像的反转圆角)
  • 可以设置边框颜色,边框粗细等
  • 支持传入NSAttributedString

注意

  1. 当箭头优先级是YBPopupMenuPriorityDirectionLeft/YBPopupMenuPriorityDirectionRight/YBPopupMenuPriorityDirectionNone时需手动设置arrowPosition来设置箭头在该行的位置
  2. 边框宽度不宜过粗,影响美观
  3. 推荐使用新的实例化接口

使用方法

  • #import "YBPopupMenu.h"
  • 方法一 (旧)

    YBPopupMenu * popupMenu = [YBPopupMenu showRelyOnView:sender titles:TITLES icons:ICONS menuWidth:120 delegate:self];
    popupMenu.dismissOnSelected = NO;
    popupMenu.isShowShadow = YES;
    popupMenu...;
  • 方法二 (推荐)

    [YBPopupMenu showAtPoint:p titles:TITLES icons:nil menuWidth:110 otherSettings:^(YBPopupMenu *popupMenu) {
        popupMenu.dismissOnSelected = NO;
        popupMenu.isShowShadow = YES;
        popupMenu.delegate = self;
        popupMenu.offset = 10;
        popupMenu.type = YBPopupMenuTypeDark;
        popupMenu.rectCorner = UIRectCornerBottomLeft | UIRectCornerBottomRight;
        popupMenu...;
    }];

版本支持

  • xcode7.0+

  • 如果您在使用本库的过程中发现任何bug或者有更好建议,欢迎 @issues 我或联系本人email [email protected]

Latest podspec

{
    "name": "DFYBPopupMenu",
    "version": "1.1.3",
    "summary": "u5febu901fu96c6u6210popupMenu",
    "description": "Code created and updated by Lyb.",
    "homepage": "https://github.com/DeanFs/YBPopupMenu",
    "license": "MIT",
    "authors": {
        "DeanFs": "[email protected]"
    },
    "source": {
        "git": "https://github.com/DeanFs/YBPopupMenu.git",
        "tag": "1.1.3"
    },
    "source_files": "DFYBPopupMenu/*.{h,m}",
    "requires_arc": true,
    "platforms": {
        "ios": "7.0"
    }
}

Pin It on Pinterest

Share This