DGDropDownBox 1.0.2

DGDropDownBox 1.0.2

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最新发布2016年3月

dsxniubility 维护。



  • yandeguangzy

点击按钮,在按钮的上方或下方显示菜单选择框

使用方法

1、#import "DGDropBoxView.h" 引入头文件,并遵守协议dropViewBoxDataSource,dropViewBoxDelegate

2、_dropView = [DGDropBoxView dropViewWithLocationView:(UIButton *)sender dropDownViewType:DROPTEXT delegate:self]; [self.view addSubview:_dropView];

3、dataSource

  • (NSInteger) numberDropViewItems://返回项目个数

  • (CGSize) dropView:(UIView *)dropView itemindex:(NSInteger)index://单个项目的尺寸

  • (NSString *) dropView:(UIView *)dropView itemTitleText:(NSInteger)index://每个项目的标题

//以下方法可不执行

  • (DROP_DIRECTION) dropViewOrientation://选项框方向

4、delegate

  • (void) dropViewDownBox: (UIView *)dropdown selectedItem:(NSInteger)index;//点击的回调