Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/12207480/DOPDropDownMenu-Enhanced
DOPDropDownMenu 添加双列表 优化版 新增图片支持(double tableView, The optimization version ,new add image,detailText)
https://github.com/12207480/DOPDropDownMenu-Enhanced
dopdropdownmenu dropdown menu objective-c
Last synced: 2 months ago
JSON representation
DOPDropDownMenu 添加双列表 优化版 新增图片支持(double tableView, The optimization version ,new add image,detailText)
- Host: GitHub
- URL: https://github.com/12207480/DOPDropDownMenu-Enhanced
- Owner: 12207480
- License: mit
- Created: 2015-03-24T11:24:47.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-04-12T11:08:45.000Z (almost 6 years ago)
- Last Synced: 2024-10-29T17:56:00.692Z (3 months ago)
- Topics: dopdropdownmenu, dropdown, menu, objective-c
- Language: Objective-C
- Homepage:
- Size: 425 KB
- Stars: 1,744
- Watchers: 50
- Forks: 362
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-iOS - DOPDropDownMenu-Enhanced - DOPDropDownMenu 添加双列表 优化版 新增图片支持 (UI Components)
README
# DOPDropDownMenu-Enhanced
**New Update:**
support cell image
新增cell 图片 支持, 新增 detailTextDOPDropDownMenu 添加双列表 优化版 (double tableView, The optimization version )
首先 感谢 DOPDropDownMenu 作者的无私奉献和允许, https://github.com/dopcn/DOPDropDownMenu
我在此基础上美化来了界面,添加了双列表的应用,优化了代码,增强了稳定性,希望大家喜欢
First, I would like to thank the author of the [DOPDropDownMenu](https://github.com/dopcn/DOPDropDownMenu) for their selfless dedication.
This enhanced version includes beautiful improvements to the interface, double tableview capability, optimized code, and improved stability. Enjoy!
## CocoaPods
```
pod 'DOPDropDownMenu-Enhanced', '~> 1.0.0'
```### 应用截图
![image](https://raw.githubusercontent.com/12207480/DOPDropDownMenu-Enhanced/master/screenshot/dopmenu.png)
![image](https://raw.githubusercontent.com/12207480/DOPDropDownMenu-Enhanced/master/screenshot/dopmendemo.gif)### 用法
```objc
#pragma mark - data source protocol
@class DOPDropDownMenu;@protocol DOPDropDownMenuDataSource
@required
/**
* 返回 menu 第column列有多少行
*/
- (NSInteger)menu:(DOPDropDownMenu *)menu numberOfRowsInColumn:(NSInteger)column;/**
* 返回 menu 第column列 每行title
*/
- (NSString *)menu:(DOPDropDownMenu *)menu titleForRowAtIndexPath:(DOPIndexPath *)indexPath;@optional
/**
* 返回 menu 有多少列 ,默认1列
*/
- (NSInteger)numberOfColumnsInMenu:(DOPDropDownMenu *)menu;// 新增 返回 menu 第column列 每行image
- (NSString *)menu:(DOPDropDownMenu *)menu imageNameForRowAtIndexPath:(DOPIndexPath *)indexPath;// 新增 detailText ,right text
- (NSString *)menu:(DOPDropDownMenu *)menu detailTextForRowAtIndexPath:(DOPIndexPath *)indexPath;/** 新增
* 当有column列 row 行 返回有多少个item ,如果>0,说明有二级列表 ,=0 没有二级列表
* 如果都没有可以不实现该协议
*/
- (NSInteger)menu:(DOPDropDownMenu *)menu numberOfItemsInRow:(NSInteger)row column:(NSInteger)column;/** 新增
* 当有column列 row 行 item项 title
* 如果都没有可以不实现该协议
*/
- (NSString *)menu:(DOPDropDownMenu *)menu titleForItemsInRowAtIndexPath:(DOPIndexPath *)indexPath;// 新增 当有column列 row 行 item项 image
- (NSString *)menu:(DOPDropDownMenu *)menu imageNameForItemsInRowAtIndexPath:(DOPIndexPath *)indexPath;// 新增
- (NSString *)menu:(DOPDropDownMenu *)menu detailTextForItemsInRowAtIndexPath:(DOPIndexPath *)indexPath;@end
#pragma mark - delegate
@protocol DOPDropDownMenuDelegate
@optional
/**
* 点击代理,点击了第column 第row 或者item项,如果 item >=0
*/
- (void)menu:(DOPDropDownMenu *)menu didSelectRowAtIndexPath:(DOPIndexPath *)indexPath;
@end
```