Declared in ETAlert.h

Overview

UIAlertView (ETFramework) is a helper category that adds some better handling functionality to UIAlertView objects.

Class Methods

showAlertWithAppTitleAndError:

Shows a UIAlertView with the AppName as the title and the localizedDescription property of the provided NSError as the body.

+ (void)showAlertWithAppTitleAndError:(NSError *)error

Parameters

error

The NSError that will be displayed in the UIAlertView.

Declared In

ETAlert.h

showAlertWithAppTitleAndError:completionHandler:

Shows a UIAlertView with the AppName as the title and the localizedDescription property of the provided NSError as the body.

+ (void)showAlertWithAppTitleAndError:(NSError *)error completionHandler:(void ( ^ ) ( NSInteger buttonIndex ))completionHandler

Parameters

error

The NSError that will be displayed in the UIAlertView.

completionHandler

The code block that will be executed when any button is tapped on the shown UIAlertView.

Declared In

ETAlert.h

showAlertWithAppTitleAndMessage:completionHandler:

Shows a UIAlertView object with the AppName as the UIAlertView title and the provided message and executes the provided code block whenever a button on the shown UIAlertView is tapped.

+ (void)showAlertWithAppTitleAndMessage:(NSString *)alertMessage completionHandler:(void ( ^ ) ( NSInteger buttonIndex ))completionHandler

Parameters

alertMessage

The NSString object that will be displayed as the UIAlertView body message.

completionHandler

The code block that will be executed when any button is tapped on the shown UIAlertView.

Declared In

ETAlert.h

showAlertWithAppTitleAndMessage:delegate:

Shows a UIAlertView object with the AppName as the UIAlertView title and the provided message and delegate.

+ (void)showAlertWithAppTitleAndMessage:(NSString *)alertMessage delegate:(id<UIAlertViewDelegate>)delegate

Parameters

alertMessage

The NSString object that will be displayed as the UIAlertView body message.

delegate

The id<UIAlertViewDelegate> object that will be set as the delegate of the shown UIAlertView.

Declared In

ETAlert.h

showAlertWithTitle:message:completionHandler:

Shows a UIAlertView object with the provided title, message and completion block.

+ (void)showAlertWithTitle:(NSString *)alertTitle message:(NSString *)alertMessage completionHandler:(void ( ^ ) ( NSInteger buttonIndex ))completionHandler

Parameters

alertTitle

The NSString object that will be used as the UIAlertView title.

alertMessage

The NSString object that will be displayed as the UIAlertView body message.

completionHandler

The code block that will be executed when any button is tapped on the shown UIAlertView.

Declared In

ETAlert.h

showAlertWithTitle:message:delegate:

Shows a UIAlertView object with the provided title, message and delegate.

+ (void)showAlertWithTitle:(NSString *)alertTitle message:(NSString *)alertMessage delegate:(id<UIAlertViewDelegate>)delegate

Parameters

alertTitle

The NSString object that will be used as the UIAlertView title.

alertMessage

The NSString object that will be displayed as the UIAlertView body message.

delegate

The id<UIAlertViewDelegate> object that will be set as the delegate of the shown UIAlertView.

Declared In

ETAlert.h

Instance Methods

initWithTitle:message:completionHandler:buttonTitles:

Creates a UIAlertView object with the provided details.

- (id)initWithTitle:(NSString *)title message:(NSString *)message completionHandler:(void ( ^ ) ( NSInteger buttonIndex ))completionHandler buttonTitles:(NSString *)defaultButtonTitle, ...

Parameters

title

The NSString object that will be used as the UIAlertView title.

message

The NSString object that will be used as the UIAlertView message body.

completionHandler

The code block that will be executed when any button is tapped on the shown UIAlertView.

defaultButtonTitle

The NSString that will be used as the default button title.

...

More NSString objects (separated by ,) that can be used as additional buttons on the UIAlertView (Up to 16 objects/buttons).

Return Value

A UIAlertView initialized with the provided parameterds. The UIAlertView is just initialized but not shown.

Declared In

ETAlert.h