21 Star 55 Fork 23

Mr-R-yan / RW_DropdownMenu

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
README.md 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
Mr-R-yan 提交于 2016-04-21 10:49 . Update README.md

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

Objective-C
1
https://gitee.com/RyanPeng/RW_DropdownMenu.git
git@gitee.com:RyanPeng/RW_DropdownMenu.git
RyanPeng
RW_DropdownMenu
RW_DropdownMenu
master

搜索帮助