DJWActionSheet 1.0.4

DJWActionSheet 1.0.4

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

Dan Williams 维护。




针对 TweetBot 风格的 UIActionSheet 的基于块的行为替代方案

演示

Screenshot

用法

创建并显示动作表

- (instancetype)initWithTitle:(NSString *)title
            cancelButtonTitle:(NSString *)cancelButtonTitle
       destructiveButtonTitle:(NSString *)destructiveButtonTitle
            otherButtonTitles:(NSArray *)otherButtonTitles
                     tapBlock:(DJWActionSheetTapBlock)tapBlock
                containerView:(UIView *)containerView;

- (void)showInView:(UIView *)view;

或者使用

+ (void)showInView:(UIView *)view
         withTitle:(NSString *)title
 cancelButtonTitle:(NSString *)cancelButtonTitle
destructiveButtonTitle:(NSString *)destructiveButtonTitle
 otherButtonTitles:(NSArray *)otherButtonTitles
          tapBlock:(DJWActionSheetTapBlock)tapBlock;

在指定视图中创建并显示动作表。

当用户通过点击其中一个按钮进行响应时,将执行 tapBlock。使用 tappedButtonIndex 决定要采取的操作。

安装

如果您正在使用 Cocoapods,只需将 DJWActionSheet 添加到您的 Podfile 中。或者,将 DJWActionSheet.hDJWActionSheet.m 添加到您的项目中。