Giter Club home page Giter Club logo

rw_dropdownmenu's Introduction

RW_DropdownMenu

Import

导入头文件DropdownMenu.h

How To Use

实现初始化

  • (id)initDropdownWithButtonTitles:(NSArray*)titles andLeftListArray:(NSArray*)leftArray andRightListArray:(NSArray *)rightArray;
  • 例如:
  • DropdownMenu *dropdown = [[DropdownMenu alloc] initDropdownWithButtonTitles:_titleArray andLeftListArray:_leftArray andRightListArray:_rightArray];
    dropdown.delegate = self; //此句的代理方法可返回选中下标值
    [self.view addSubview:dropdown.view];

Delegate

//实现代理,返回选中的下标,若左边没有列表,则返回0。ButtonIndex为打开的第几个按钮或列表下标,left为左边选中下标,right为右边选中下标

  • (void)dropdownSelectedButtonIndex:(NSString *)index LeftIndex:(NSString *)left RightIndex:(NSString *)right { NSLog(@"%s : You choice button %@, left %@ and right %@", FUNCTION, index, left, right); }

Thanks

感谢大家对我的支持,最近做了一些小更新; <br/ >2016-04-21 -- 增加返回选的第几个button(或者选中的是第几个列表);选中后button显示选中值

Demo

image

rw_dropdownmenu's People

Contributors

ryan-wong-ios avatar

Watchers

 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.