GithubHelp home page GithubHelp logo

hypopmenuview's Introduction

HyPopMenuView

Platform Language License

Effect Diagram GIF

image

Manually Import【手动导入】

【将HyPopMenuView,UIColor+ImageGetColor,MenuLabel所有源代码拽入项目中】 【导入主头文件:#import "HyPopMenuView.h"

HyPopMenuView.h         HyPopMenuView.m
UIColor+ImageGetColor.h UIColor+ImageGetColor.m
MenuLabel.h             MenuLabel.m

Example【示例】

NSArray *Objs = @[
                      [MenuLabel CreatelabelIconName:@"tabbar_compose_idea" Title:@"文字"],
                      [MenuLabel CreatelabelIconName:@"tabbar_compose_photo" Title:@"相册"],
                      [MenuLabel CreatelabelIconName:@"tabbar_compose_camera" Title:@"拍摄"],
                      [MenuLabel CreatelabelIconName:@"tabbar_compose_lbs" Title:@"签到"],
                      [MenuLabel CreatelabelIconName:@"tabbar_compose_review" Title:@"点评"],
                      [MenuLabel CreatelabelIconName:@"tabbar_compose_more" Title:@"更多"],
                      ];
    CGFloat x,y,w,h;
    x = CGRectGetWidth(self.view.bounds)/2 - 213/2;
    y = CGRectGetHeight([UIScreen mainScreen].bounds)/2 * 0.3f;
    w = 213;
    h = 57;
    //自定义的头部视图
    UIImageView *topView = [[ImageView alloc] initWithFrame:CGRectMake(x, y, w, h)];
    topView.image = [UIImage imageNamed:@"compose_slogan"];
    topView.contentMode = UIViewContentModeScaleAspectFit;
    
    NSMutableDictionary *AudioDictionary = [NSMutableDictionary dictionary];
    
    //添加弹出菜单音效
    [AudioDictionary setObject:@"composer_open" forKey:kHyPopMenuViewOpenAudioNameKey];
    [AudioDictionary setObject:@"wav" forKey:kHyPopMenuViewOpenAudioTypeKey];
    //添加取消菜单音效
    [AudioDictionary setObject:@"composer_close" forKey:kHyPopMenuViewCloseAudioNameKey];
    [AudioDictionary setObject:@"wav" forKey:kHyPopMenuViewCloseAudioTypeKey];
    //添加选中按钮音效
    [AudioDictionary setObject:@"composer_select" forKey:kHyPopMenuViewSelectAudioNameKey];
    [AudioDictionary setObject:@"wav" forKey:kHyPopMenuViewSelectAudioTypeKey];
    
    
    [HyPopMenuView CreatingPopMenuObjectItmes:Objs TopView:topView OpenOrCloseAudioDictionary:AudioDictionary SelectdCompletionBlock:^(MenuLabel *menuLabel, NSInteger index) {
        NSLog(@"index:%ld ItmeNmae:%@",index,menuLabel.title);
    }];

期待

  • 如果在使用过程中遇到BUG,希望你能Issues我
  • 将模仿进行到底,让更多新手开发者了解比较酷的界面实现思路...
  • 如果觉得好用请Star!
  • 谢谢!

hypopmenuview's People

Contributors

wwdc14yh 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.