# TCGBToastStyle Class Reference

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

## Overview

`TCGBToastStyle` instances define the look and feel for toast views created via the `makeToast:` methods as well for toast views created directly with `toastViewForMessage:title:image:style:`.

Warning: `TCGBToastStyle` offers relatively simple styling options for the default toast view. If you require a toast view with more complex UI, it probably makes more sense to create your own custom UIView subclass and present it with the `showToast:` methods.

### `backgroundColor`

The background color. Default is `[UIColor blackColor]` at 80% opacity.

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

#### Declared In

`UIView+Toast.h`

### `titleColor`

The title color. Default is `[UIColor whiteColor]`.

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

#### Declared In

`UIView+Toast.h`

### `messageColor`

The message color. Default is `[UIColor whiteColor]`.

`@property (strong, nonatomic) UIColor *messageColor`

#### Declared In

`UIView+Toast.h`

### `maxWidthPercentage`

A percentage value from 0.0 to 1.0, representing the maximum width of the toast view relative to it’s superview. Default is 0.8 (80% of the superview’s width).

`@property (assign, nonatomic) CGFloat maxWidthPercentage`

#### Declared In

`UIView+Toast.h`

### `maxHeightPercentage`

A percentage value from 0.0 to 1.0, representing the maximum height of the toast view relative to it’s superview. Default is 0.8 (80% of the superview’s height).

`@property (assign, nonatomic) CGFloat maxHeightPercentage`

#### Declared In

`UIView+Toast.h`

### `horizontalPadding`

The spacing from the horizontal edge of the toast view to the content. When an image is present, this is also used as the padding between the image and the text. Default is 10.0.

`@property (assign, nonatomic) CGFloat horizontalPadding`

#### Declared In

`UIView+Toast.h`

### `verticalPadding`

The spacing from the vertical edge of the toast view to the content. When a title is present, this is also used as the padding between the title and the message. Default is 10.0.

`@property (assign, nonatomic) CGFloat verticalPadding`

#### Declared In

`UIView+Toast.h`

### `cornerRadius`

The corner radius. Default is 10.0.

`@property (assign, nonatomic) CGFloat cornerRadius`

#### Declared In

`UIView+Toast.h`

### `titleFont`

The title font. Default is `[UIFont boldSystemFontOfSize:16.0]`.

`@property (strong, nonatomic) UIFont *titleFont`

#### Declared In

`UIView+Toast.h`

### `messageFont`

The message font. Default is `[UIFont systemFontOfSize:16.0]`.

`@property (strong, nonatomic) UIFont *messageFont`

#### Declared In

`UIView+Toast.h`

### `titleAlignment`

The title text alignment. Default is `NSTextAlignmentLeft`.

`@property (assign, nonatomic) NSTextAlignment titleAlignment`

#### Declared In

`UIView+Toast.h`

### `messageAlignment`

The message text alignment. Default is `NSTextAlignmentLeft`.

`@property (assign, nonatomic) NSTextAlignment messageAlignment`

#### Declared In

`UIView+Toast.h`

### `titleNumberOfLines`

The maximum number of lines for the title. The default is 0 (no limit).

`@property (assign, nonatomic) NSInteger titleNumberOfLines`

#### Declared In

`UIView+Toast.h`

### `messageNumberOfLines`

The maximum number of lines for the message. The default is 0 (no limit).

`@property (assign, nonatomic) NSInteger messageNumberOfLines`

#### Declared In

`UIView+Toast.h`

### `displayShadow`

Enable or disable a shadow on the toast view. Default is `NO`.

`@property (assign, nonatomic) BOOL displayShadow`

#### Declared In

`UIView+Toast.h`

### `shadowColor`

The shadow color. Default is `[UIColor blackColor]`.

`@property (strong, nonatomic) UIColor *shadowColor`

#### Declared In

`UIView+Toast.h`

### `shadowOpacity`

A value from 0.0 to 1.0, representing the opacity of the shadow. Default is 0.8 (80% opacity).

`@property (assign, nonatomic) CGFloat shadowOpacity`

#### Declared In

`UIView+Toast.h`

### `shadowRadius`

The shadow radius. Default is 6.0.

`@property (assign, nonatomic) CGFloat shadowRadius`

#### Declared In

`UIView+Toast.h`

### `shadowOffset`

The shadow offset. The default is `CGSizeMake(4.0, 4.0)`.

`@property (assign, nonatomic) CGSize shadowOffset`

#### Declared In

`UIView+Toast.h`

### `imageSize`

The image size. The default is `CGSizeMake(80.0, 80.0)`.

`@property (assign, nonatomic) CGSize imageSize`

#### Declared In

`UIView+Toast.h`

### `activitySize`

The size of the toast activity view when `makeToastActivity:` is called. Default is `CGSizeMake(100.0, 100.0)`.

`@property (assign, nonatomic) CGSize activitySize`

#### Declared In

`UIView+Toast.h`

### `fadeDuration`

The fade in/out animation duration. Default is 0.2.

`@property (assign, nonatomic) NSTimeInterval fadeDuration`

#### Declared In

`UIView+Toast.h`

### `– initWithDefaultStyle`

Creates a new instance of `TCGBToastStyle` with all the default values set.

`- (instancetype)initWithDefaultStyle`

#### Declared In

`UIView+Toast.h`

### `– init`

Only the designated initializer should be used to create an instance of `TCGBToastStyle`.

`- (instancetype)init`

#### Discussion

Warning: Only the designated initializer should be used to create an instance of `TCGBToastStyle`.

#### Declared In

`UIView+Toast.h`