Latest 2.3.4
Homepage https://github.com/seivan/SHActionSheetBlocks
License MIT
Platforms ios 6.0, requires ARC
Authors

CI Status
Version
Platform
License

This pod is used by SHUIKitBlocks as part of many components covering to plug the holes missing from Foundation, UIKit, CoreLocation, GameKit, MapKit and other aspects of an iOS application’s architecture.

Overview

The blocks are automatically removed once the sheet is gone, so it isn’t necessary to clean up – Swizzle Free(™)

API

Init

Add

Properties

Installation

pod 'SHActionSheetBlocks'

Setup

Put this either in specific files or your project prefix file

#import "UIActionSheet+SHActionSheetBlocks.h"

or

#import "SHActionSheetBlocks.h"

API

Init

#pragma mark -
#pragma mark Init
+(instancetype)SH_actionSheetWithTitle:(NSString *)theTitle;

+(instancetype)SH_actionSheetWithTitle:(NSString *)theTitle
                          buttonTitles:(id<NSFastEnumeration>)theButtonTitles
                           cancelTitle:(NSString *)theCancelTitle
                      destructiveTitle:(NSString *)theDestructiveTitle
                             withBlock:(SHActionSheetBlock)theBlock;

Add

#pragma mark -
#pragma mark Adding
-(NSInteger)SH_addButtonWithTitle:(NSString *)theTitle
                      withBlock:(SHActionSheetBlock)theBlock;

///Will add a new destructive button and make previous Destructive buttons to normal
-(NSInteger)SH_addButtonDestructiveWithTitle:(NSString *)theTitle
                                    withBlock:(SHActionSheetBlock)theBlock;

///Will add a new destructive button and make previous Destructive buttons to normal
-(NSInteger)SH_addButtonCancelWithTitle:(NSString *)theTitle
                               withBlock:(SHActionSheetBlock)theBlock;

Properties

#pragma mark -
#pragma mark Properties

#pragma mark -
#pragma mark Setters
-(void)SH_setButtonBlockForIndex:(NSInteger)theButtonIndex
                       withBlock:(SHActionSheetBlock)theBlock;

-(void)SH_setButtonDestructiveBlock:(SHActionSheetBlock)theBlock;
-(void)SH_setButtonCancelBlock:(SHActionSheetBlock)theBlock;

-(void)SH_setWillShowBlock:(SHActionSheetShowBlock)theBlock;
-(void)SH_setDidShowBlock:(SHActionSheetShowBlock)theBlock;

-(void)SH_setWillDismissBlock:(SHActionSheetDismissBlock)theBlock;
-(void)SH_setDidDismissBlock:(SHActionSheetDismissBlock)theBlock;

#pragma mark -
#pragma mark Getters
-(SHActionSheetBlock)SH_blockForButtonIndex:(NSInteger)theButtonIndex;

@property(nonatomic,readonly) SHActionSheetBlock SH_blockForDestructiveButton;
@property(nonatomic,readonly) SHActionSheetBlock SH_blockForCancelButton;

@property(nonatomic,readonly) SHActionSheetShowBlock    SH_blockWillShow;
@property(nonatomic,readonly) SHActionSheetShowBlock    SH_blockDidShow;

@property(nonatomic,readonly) SHActionSheetDismissBlock SH_blockWillDismiss;
@property(nonatomic,readonly) SHActionSheetDismissBlock SH_blockDidDismiss;

Contact

If you end up using SHActionSheetBlocks in a project, I’d love to hear about it.

email: [email protected]
twitter: @seivanheidari

License

SHActionSheetBlocks is © 2013 Seivan and may be freely
distributed under the MIT license.
See the LICENSE.md file.

Latest podspec

{
    "name": "SHActionSheetBlocks",
    "version": "2.3.4",
    "summary": "Prefixed UIActionSheet category with blocks, auto-removed. Swizzle free!",
    "description": "n                    UIActionSheet buttons with blocks.n                    Blocks are hold with a weak reference so you don't have to cleanup when your object is gone.n  n                    * Swizzle and junk freen                    * No need to clean up after - The control blocks are self maintained.n                    * UIActionSheet are referenced in a map with weak propertiesn                    * Prefixed selectors.n                    * Minimum clutter on top of the public interface.n                    n",
    "homepage": "https://github.com/seivan/SHActionSheetBlocks",
    "license": "MIT",
    "authors": {
        "Seivan Heidari": "[email protected]"
    },
    "source": {
        "git": "https://github.com/seivan/SHActionSheetBlocks.git",
        "tag": "2.3.4"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source_files": "SHActionSheetBlocks/**/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This