Coder Social home page Coder Social logo

ybpopupmenu's Introduction

YBPopupMenu

  • 快速集成popupMenu

效果图

(演示效果)

cocoapods支持

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

重大更新

  • 代码全部重构,不过完全兼容原先的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或者有更好建议,欢迎联系本人email [email protected]

ybpopupmenu's People

Contributors

lyb5834 avatar

Watchers

James Cloos avatar GreyWolf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.