Inherits from NSObject
Declared in Bit6AlertView.h

Overview

Convenient class to show a UIAlertController of Alert style convering the entire screen.

Properties

alertController

Reference to the internal UIAlertController object.

@property (nonatomic, strong, readonly) UIAlertController *alertController

Declared In

Bit6AlertView.h

textFields

The array of text fields displayed by the alert.

@property (nullable, nonatomic, readonly) NSArray<UITextField*> *textFields

Declared In

Bit6AlertView.h

Class Methods

alertControllerWithTitle:message:

Creates Bit6AlertView with a title and a message.

+ (Bit6AlertView *)alertControllerWithTitle:(nullable NSString *)title message:(nullable NSString *)message

Parameters

title

The title of the alert. Use this string to get the user’s attention and communicate the reason for the alert.

message

Descriptive text that provides additional details about the reason for the alert.

Return Value

the new Bit6AlertView object.

Declared In

Bit6AlertView.h

showAlertControllerWithTitle:message:cancelButtonTitle:

Show a default Bit6AlertView.

+ (Bit6AlertView *)showAlertControllerWithTitle:(nullable NSString *)title message:(nullable NSString *)message cancelButtonTitle:(NSString *)cancelButtonTitle

Parameters

title

The title of the alert. Use this string to get the user’s attention and communicate the reason for the alert.

message

Descriptive text that provides additional details about the reason for the alert.

cancelButtonTitle

title of the cancel button to dismiss the alert.

Return Value

a reference to the Bit6AlertView shown.

Declared In

Bit6AlertView.h

Instance Methods

addAction:

Attaches an action object to the alert or action sheet.

- (void)addAction:(UIAlertAction *)action

Parameters

action

The action object to display as part of the alert. Actions are displayed as buttons in the alert. The action object provides the button text and the action to be performed when that button is tapped.

Declared In

Bit6AlertView.h

addCancelButtonWithTitle:

Convenient method to add an additional button with Cancel style to the UIAlertController object.

- (void)addCancelButtonWithTitle:(NSString *)cancelButtonTitle

Parameters

cancelButtonTitle

title for the cancel button.

Declared In

Bit6AlertView.h

addTextFieldWithConfigurationHandler:

Adds a text field to an alert.

- (void)addTextFieldWithConfigurationHandler:(void ( ^ __nullable ) ( UITextField *textField ))configurationHandler

Parameters

configurationHandler

A block for configuring the text field prior to displaying the alert. This block has no return value and takes a single parameter corresponding to the text field object. Use that parameter to change the text field properties..

Declared In

Bit6AlertView.h

dismiss

Dismiss the Bit6AlertView. Every UIAlertAction added to the Bit6AlertView must call this method at the end of its handler.

- (void)dismiss

Declared In

Bit6AlertView.h

show

Shows the Bit6AlertView convering the entire screen.

- (void)show

Declared In

Bit6AlertView.h