Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions SIAlertView/SIAlertView.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ typedef void(^SIAlertViewHandler)(SIAlertView *alertView);
@property (nonatomic, assign) CGFloat cornerRadius NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; // default is 2.0
@property (nonatomic, assign) CGFloat shadowRadius NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; // default is 8.0

+ (void)showMessage:(NSString *)message withDismissButtonText:(NSString *)buttonText andOptionalTransitionType:(SIAlertViewTransitionStyle)transitionStyle; // Convenience method

- (void)setDefaultButtonImage:(UIImage *)defaultButtonImage forState:(UIControlState)state NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
- (void)setCancelButtonImage:(UIImage *)cancelButtonImage forState:(UIControlState)state NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
- (void)setDestructiveButtonImage:(UIImage *)destructiveButtonImage forState:(UIControlState)state NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
Expand Down
16 changes: 16 additions & 0 deletions SIAlertView/SIAlertView.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,22 @@ @interface SIAlertBackgroundWindow ()

@implementation SIAlertBackgroundWindow

#pragma mark - Convenience method
+ (void)showMessage:(NSString *)message withTitle:(NSString *)title withDismissButtonText:(NSString *)buttonText andOptionalTransitionType:(SIAlertViewTransitionStyle)transitionStyle {

SIAlertView *alertView = [self initWithTitle:title andMessage:message];

if (transitionStyle) {
alertView.transitionStyle = transitionStyle;
}

[alertView addButtonWithTitle:buttonText type:SIAlertViewButtonTypeCancel handler:^(SIAlertView *alertView) {
// Nothing
}];
[alertView show];
}


- (id)initWithFrame:(CGRect)frame andStyle:(SIAlertViewBackgroundStyle)style
{
self = [super initWithFrame:frame];
Expand Down