Skip to content

Commit fe53453

Browse files
committed
Add SCL prefix to ValidationBlock, avoid conflicts with other libs
1 parent ddf60aa commit fe53453

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

SCLAlertView/SCLAlertView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ typedef NS_ENUM(NSInteger, SCLAlertViewBackground)
155155
* @param validationBlock A block of code that will allow you to validate fields or do any other logic you may want to do to determine if the alert should be dismissed or not. Inside of this block, return a BOOL indicating whether or not the action block should be called and the alert dismissed.
156156
* @param action A block of code to be executed when the button is pressed and validation passes.
157157
*/
158-
- (SCLButton *)addButton:(NSString *)title validationBlock:(ValidationBlock)validationBlock actionBlock:(SCLActionBlock)action;
158+
- (SCLButton *)addButton:(NSString *)title validationBlock:(SCLValidationBlock)validationBlock actionBlock:(SCLActionBlock)action;
159159

160160
/** Add a Button with a title, a target and a selector to handle when the button is pressed.
161161
*

SCLAlertView/SCLAlertView.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ - (SCLButton *)addButton:(NSString *)title actionBlock:(SCLActionBlock)action
396396
return btn;
397397
}
398398

399-
- (SCLButton *)addButton:(NSString *)title validationBlock:(ValidationBlock)validationBlock actionBlock:(SCLActionBlock)action
399+
- (SCLButton *)addButton:(NSString *)title validationBlock:(SCLValidationBlock)validationBlock actionBlock:(SCLActionBlock)action
400400
{
401401
SCLButton *btn = [self addButton:title actionBlock:action];
402402
btn.validationBlock = validationBlock;

SCLAlertView/SCLButton.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
@interface SCLButton : UIButton
1212

1313
typedef void (^SCLActionBlock)(void);
14-
typedef BOOL (^ValidationBlock)(void);
14+
typedef BOOL (^SCLValidationBlock)(void);
1515
typedef NSDictionary* (^CompleteButtonFormatBlock)(void);
1616
typedef NSDictionary* (^ButtonFormatBlock)(void);
1717

@@ -39,7 +39,7 @@ typedef NS_ENUM(NSInteger, SCLActionType)
3939
*
4040
* TODO
4141
*/
42-
@property (nonatomic, copy) ValidationBlock validationBlock;
42+
@property (nonatomic, copy) SCLValidationBlock validationBlock;
4343

4444
/** Set Complete button format block.
4545
*

0 commit comments

Comments
 (0)