CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

DJWActionSheet 1.0.4

DJWActionSheet 1.0.4

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Dan Williams.




A block based alternative to UIActionSheet in the style of TweetBot

Demo

Screenshot

Usage

Create and then show the action sheet

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

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

Alternatively, use

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

to instantiate and show the action sheet in the specified view.

When the user has responded by tapping one of the buttons, the tapBlock is executed. Use tappedButtonIndex to decide what action to take.

Installation

Simply add DJWActionSheet to your Podfile if you're using Cocoapods. Alternatively, add DJWActionSheet.h and DJWActionSheet.m to your project.