DOPDropDownMenu 0.1.1

DOPDropDownMenu 0.1.1

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布上次发布2015年5月

Cain1127 维护。



  • ysmeng

用法

要运行示例项目,请克隆仓库,然后首先从 Example 目录中运行 pod install

平台要求

iOS 7.1

说明

DOPDropDownMenu 通过 CocoaPods 可用。要安装它,只需在 Podfile 中添加以下行

个人并未去和原作者联系,并获得授权,希望大家用的时候,请清楚,原作者,我这里提供cocoaPod支持,只是为了我和我的朋友使用方便,希望作者能包涵,谢谢。 第一版本作者:https://github.com/dopcn/DOPDropDownMenu 第二版本作者:https://github.com/12207480/DOPDropDownMenu-Enhanced

第二版本的作者,在原版上美化了界面,添加了双列表的应用,优化了代码,增强了稳定性。

用法

@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;

/** 新增

  • 当有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; @end

@protocol DOPDropDownMenuDelegate @optional /**

  • 点击代理,点击了第column 第row 或者item项,如果 item >=0 */
  • (void)menu:(DOPDropDownMenu *)menu didSelectRowAtIndexPath:(DOPIndexPath *)indexPath; @end

作者

Weizhou, [email protected] 12207480, [email protected]

许可证

DOPDropDownMenu 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。