文本输入框下拉列表
- Comment API
- Manual import:
- Drag All files in the
YJDropdownListView
folder to project - Import the main file:
#import "YJDropdownListView.h"
- Drag All files in the
- 采用链式布局,可以根据自己的具体需求将不同方法自由组合,使用更灵活,可定制性高:
YJDropdownListView *listView = [YJDropdownListView dropDownListView];
NSArray *arr = @[@"haha",@"hehe",@"heoheo"];
listView.numberOfRowsInSection(^NSInteger(NSInteger section) {
return arr.count;
}).cellForRowAtIndexPath(^UITableViewCell *(UITableView *tableView, NSIndexPath *indexPath, UITableViewCell *cell) {
cell.textLabel.textColor = [UIColor redColor];
cell.textLabel.text = arr[indexPath.row];
return cell;
}).heightForRowAtIndexPath(^CGFloat(NSIndexPath *indexPath) {
return 50.f;
}).showOnSuperview(self.accountTF).didSelectRowAtIndexPath(^void (UITableView *tableView,NSIndexPath *indexPath)
{
NSLog(@"哈哈");
});
- ARC
- iOS>=7.0
- iPhone \ iPad screen anyway