Inherits from NSObject
Declared in TKAlertAction.h

Overview

This object represents an action that can be executed when tapping a button in an alert.

Properties

__nullable

The block that will execute when TKAlertAction’s button is clicked.

@property (nonatomic, copy) BOOL ( ^ handler ) ( TKAlert *__nonnull alert , TKAlertAction *__nonnull action ) __nullable

Declared In

TKAlertAction.h

backgroundColor

The background color.

@property (nonatomic, strong, nullable) UIColor *backgroundColor

Declared In

TKAlertAction.h

cornerRadius

The corner radius.

@property (nonatomic) CGFloat cornerRadius

Declared In

TKAlertAction.h

font

The font.

@property (nonatomic, strong, nullable) UIFont *font

Declared In

TKAlertAction.h

tag

The tag.

@property (nonatomic) NSInteger tag

Declared In

TKAlertAction.h

title

The title.

@property (nonatomic, strong, nullable) NSString *title

Declared In

TKAlertAction.h

titleColor

The color of the title.

@property (nonatomic, strong, nullable) UIColor *titleColor

Declared In

TKAlertAction.h

Class Methods

actionWithTitle:handler:

Initializes a TKAlertAction with a title and a block method to be called when the button of the action is tapped.

+ (instancetype __nonnull)actionWithTitle:(NSString *__nullable)title handler:(BOOL ( ^ __nullable ) ( TKAlert *__nonnull alert , TKAlertAction *__nonnull action ))handler

Parameters

title

The title.

handler

The block method to be called when the button of the action is clicked.

Declared In

TKAlertAction.h

Instance Methods

initWithTitle:handler:

Initializes a TKAlertAction with a title and a block method to be called when the button of the action is tapped.

- (instancetype __nonnull)initWithTitle:(NSString *__nullable)title handler:(BOOL ( ^ __nullable ) ( TKAlert *__nonnull alert , TKAlertAction *__nonnull action ))handler

Parameters

title

The title.

handler

The block method to be called when the button of the action is tapped.

Declared In

TKAlertAction.h