SHActionSheetBlocks 2.3.4

SHActionSheetBlocks 2.3.4

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

Seivan Heidari 维护。



  • By
  • Seivan Heidari

此库用作 SHUIKitBlocks 的一部分,许多组件覆盖了从 Foundation、UIKit、CoreLocation、GameKit、MapKit 等方面填补 iOS 应用架构中缺失的功能。

概述

一旦表单消失,块将自动移除,因此无需清理 - Swizzle Free(™)

API

初始化

添加

属性

安装

pod 'SHActionSheetBlocks'

设置

将这些设置在特定文件或项目前缀文件中

#import "UIActionSheet+SHActionSheetBlocks.h"

#import "SHActionSheetBlocks.h"

API

初始化

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

添加

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

属性

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

联系

如果您在项目中使用了 SHActionSheetBlocks,我很乐意听听您的意见。

电子邮件:[email protected]
推特:@seivanheidari

许可证

SHActionSheetBlocks 由 © 2013 Seivan 创建,可免费在MIT 许可证下分发。请参阅LICENSE.md文件。