点击按钮,在按钮的上方或下方显示菜单选择框
使用方法
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://每个项目的标题
//以下方法可不执行
4、delegate