版本 0.0.4 的 PYDropMenu

PYDropMenu 版本 0.0.4

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最后发布2015年4月

Tsau,Po-Yuan 维护。



PYDropMenu 版本 0.0.4

  • 作者
  • Tsau,Po-Yuan

PYDropMenu是一种为父视图添加下拉效果菜单的简单方法。

PYDropMenu Screenshot

用法

//setup
_dropMenu = [[PYDropMenu alloc] initWithTargetView:self.view];
_dropMenu.delegate = self;
_dropMenu.dataSource = self;

//show/hide the menu
[_dropMenu toggleMenu];

然后对必要的方法做出响应

//delegate
@required
- (void)pyDropMenuDidButtonClick:(PYDropMenu*)dropMenu withIndex:(NSInteger)index andSubIndex:(NSInteger)subIndex;

@optional
- (void)pyDropMenu:(PYDropMenu*)dropMenu getPYDropMenuButton:(UIButton*)button withIndex:(NSInteger)index;

- (void)pyDropMenu:(PYDropMenu*)dropMenu getPYDropMenuSubButton:(UIButton*)subbutton withIndex:(NSInteger)index andSubIndex:(NSInteger)subIndex;

//datasource
@required
- (NSInteger)numberOfButtonsInPYDropMenu:(PYDropMenu*)dropMenu;

- (NSString*)titleForButtonAtIndex:(NSInteger)buttonIndex withPYDropMenu:(PYDropMenu*)dropMenu;

@optional
- (NSInteger)numberOfSubBtnsInButton:(NSInteger)buttonIndex withPYDropMenu:(PYDropMenu*)dropMenu;

- (NSString*)titleForSubBtnsAtSubIndex:(NSInteger)subbuttonIndex andIndex:(NSInteger)buttonIndex withPYDropMenu:(PYDropMenu*)dropMenu;

添加到您的项目

platform :ios, '7'
    pod 'PYDropMenu'

MIT许可


版权所有(c)2015 Tsau,Po-Yuan(tsaupoyuan.com) 任何人都可以免费获得本软件及其相关文档(“软件”)副本,不受限制地处理软件,包括(但不限于)使用、复制、修改、合并、发布、分发、再许可和/或出售软件副本,并且允许向提供软件的个人授予上述权利,但以以下条件为限:

上述版权声明和本许可声明应包括在所有软件副本或主要部分中。

软件提供“现状”,不提供任何明示或暗示的保证,包括但不限于适销性保证和针对特定目的的适用性保证。在任何情况下,作者或版权所有者均不对任何索赔、损害或其他责任承担责任,无论该责任基于合同、侵权或其他法律理论,只要该责任与软件或其使用或任何其他相关。