TCGBToastManager Class Reference

Inherits from NSObject
Declared in UIView+Toast.h
UIView+Toast.m

Overview

TCGBToastManager provides general configuration options for all toast notifications. Backed by a singleton instance.

+ setSharedStyle:

Sets the shared style on the singleton. The shared style is used whenever a makeToast: method (or toastViewForMessage:title:image:style:) is called with with a nil style. By default, this is set to TCGBToastStyle’s default style.

+ (void)setSharedStyle:(TCGBToastStyle *)sharedStyle

Parameters

sharedStyle

the shared style

Declared In

UIView+Toast.h

+ sharedStyle

Gets the shared style from the singlton. By default, this is TCGBToastStyle’s default style.

+ (TCGBToastStyle *)sharedStyle

Return Value

the shared style

Declared In

UIView+Toast.h

+ setTapToDismissEnabled:

Enables or disables tap to dismiss on toast views. Default is YES.

+ (void)setTapToDismissEnabled:(BOOL)tapToDismissEnabled

Parameters

tapToDismissEnabled

YES or NO

Declared In

UIView+Toast.h

+ isTapToDismissEnabled

Returns YES if tap to dismiss is enabled, otherwise NO. Default is YES.

+ (BOOL)isTapToDismissEnabled

Return Value

BOOL YES or NO

Declared In

UIView+Toast.h

+ setQueueEnabled:

Enables or disables queueing behavior for toast views. When YES, toast views will appear one after the other. When NO, multiple Toast views will appear at the same time (potentially overlapping depending on their positions). This has no effect on the toast activity view, which operates independently of normal toast views. Default is YES.

+ (void)setQueueEnabled:(BOOL)queueEnabled

Parameters

queueEnabled

YES or NO

Declared In

UIView+Toast.h

+ isQueueEnabled

Returns YES if the queue is enabled, otherwise NO. Default is YES.

+ (BOOL)isQueueEnabled

Return Value

BOOL

Declared In

UIView+Toast.h

+ setDefaultDuration:

Sets the default duration. Used for the makeToast: and showToast: methods that don’t require an explicit duration. Default is 3.0.

+ (void)setDefaultDuration:(NSTimeInterval)duration

Parameters

duration

The toast duration

Declared In

UIView+Toast.h

+ defaultDuration

Returns the default duration. Default is 3.0.

+ (NSTimeInterval)defaultDuration

Return Value

duration The toast duration

Declared In

UIView+Toast.h

+ setDefaultPosition:

Sets the default position. Used for the makeToast: and showToast: methods that don’t require an explicit position. Default is kTCGBToastPositionBottom.

+ (void)setDefaultPosition:(id)position

Parameters

position

The default center point. Can be one of the predefined TCGBToastPosition constants or a CGPoint wrapped in an NSValue object.

Declared In

UIView+Toast.h

+ defaultPosition

Returns the default toast position. Default is kTCGBToastPositionBottom.

+ (id)defaultPosition

Return Value

position The default center point. Will be one of the predefined TCGBToastPosition constants or a CGPoint wrapped in an NSValue object.

Declared In

UIView+Toast.h