Giter VIP home page Giter VIP logo

yhpopmenu's Introduction

YHPopMenu

仿微信“+”弹出菜单。

修改图标和文字参数配置属性

@property (nonatomic,assign) CGFloat iconW;             //图标宽(默认宽高相等)
@property (nonatomic,assign) CGFloat fontSize;          //字体大小
@property (nonatomic,strong) UIColor *fontColor;        //字体颜色
@property (nonatomic,strong) UIColor *itemBgColor;      //item背景颜色
@property (nonatomic,assign) CGFloat itemNameLeftSpace; //itemName左边距
@property (nonatomic,assign) CGFloat iconLeftSpace;     //icon左边距离
@property (nonatomic,assign) CGFloat itemH;//item高度
@property (nonatomic,copy) NSArray *iconNameArray;      //图标名字Array
@property (nonatomic,copy) NSArray *itemNameArray;      //item名字Array
@property (nonatomic,assign) BOOL canTouchTabbar;       //可以点击Tabbar;(默认是遮挡Tabbar)

弹出菜单

- (void)showPopMenu{
  //设置弹出视图的坐标,宽高
  CGFloat itemH = 50;//每个item的高度
  CGFloat w = 150;
  CGFloat h = 6*itemH;
  CGFloat r = 15;
  CGFloat x = SCREEN_WIDTH - w - r;
  CGFloat y = 1;
    
  //设置参数属性,图标和文字。
  YHPopMenuView *popView = [[YHPopMenuView alloc] initWithFrame:CGRectMake(x, y, w, h)];
  popView.iconNameArray = @[@"home_img_pubDyn",@"home_img_offerReward",@"home_img_pubPosition",@"chat_img_groupchat",@"chat_img_add",@"home_img_scan"];         
  popView.itemNameArray = @[@"发动态",@"发悬赏",@"发职位",@"发起群聊",@"添加朋友",@"扫一扫"];
  popView.itemH     = itemH;
  popView.fontSize  = 16.0f;
  popView.fontColor = [UIColor whiteColor];
  popView.canTouchTabbar = YES;
  [popView show];
}

关闭弹出菜单

- (void)hidePopMenuWithAnimation:(BOOL)animate{
          [_popView hideWithAnimation:animate];
}

效果图

还在路上,稍等...

呈上精品

YHPopMenuView Swift版:YHPopMenu-Swift-

你的支持,我的动力!

yhpopmenu's People

Contributors

samuelandkevin avatar

Stargazers

 avatar 小蜜蜂 avatar hy avatar web avatar ABZeng avatar andyLiu avatar yiimoney avatar ArrQ avatar  avatar  avatar CodeDavy avatar Caroline avatar 李大瘦 avatar  avatar kazarus avatar Musk66 avatar MaLi avatar whw avatar  avatar obaby avatar Vincent_teng avatar 熊少华 avatar  avatar

Watchers

James Cloos avatar  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.