Declared in UIButton+TKCategory.h

Overview

Additional functionality for UIButton.

Tasks

Class Methods

buttonWithFrame:

Creates and returns a new button of type UIButtonCustom with the specified frame.

+ (instancetype)buttonWithFrame:(CGRect)frame

Parameters

frame

The frame for the button view.

Return Value

A newly create button.

Discussion

Creates and returns a new button of type UIButtonCustom with the specified frame.

Declared In

UIButton+TKCategory.h

buttonWithFrame:image:

Creates and returns a new button of type UIButtonCustom with the specified frame and image.

+ (instancetype)buttonWithFrame:(CGRect)frame image:(UIImage *)image

Parameters

frame

The frame for the button view.

image

The image for UIControlStateNormal.

Return Value

A newly create button.

Discussion

Creates and returns a new button of type UIButtonCustom with the specified frame and image.

Declared In

UIButton+TKCategory.h

buttonWithFrame:image:highlightedImage:

Creates and returns a new button of type UIButtonCustom with the specified frame, title and background image.

+ (instancetype)buttonWithFrame:(CGRect)frame image:(UIImage *)image highlightedImage:(UIImage *)highlightedImage

Parameters

frame

The frame for the button view.

image

The image for UIControlStateNormal.

highlightedImage

The image for UIControlStateHighlighted.

Return Value

A newly create button.

Discussion

Creates and returns a new button of type UIButtonCustom with the specified frame, title and background image.

Declared In

UIButton+TKCategory.h

buttonWithFrame:title:

Creates and returns a new button of type UIButtonCustom with the specified frame and title.

+ (instancetype)buttonWithFrame:(CGRect)frame title:(NSString *)title

Parameters

frame

The frame for the button view.

title

The title for UIControlStateNormal.

Return Value

A newly create button.

Discussion

Creates and returns a new button of type UIButtonCustom with the specified frame and title.

Declared In

UIButton+TKCategory.h

buttonWithFrame:title:backgroundImage:

Creates and returns a new button of type UIButtonCustom with the specified frame, title and background image.

+ (instancetype)buttonWithFrame:(CGRect)frame title:(NSString *)title backgroundImage:(UIImage *)backgroundImage

Parameters

frame

The frame for the button view.

title

The title for UIControlStateNormal.

backgroundImage

The background image for UIControlStateNormal.

Return Value

A newly create button.

Discussion

Creates and returns a new button of type UIButtonCustom with the specified frame, title and background image.

Declared In

UIButton+TKCategory.h

buttonWithFrame:title:backgroundImage:highlightedBackgroundImage:

Creates and returns a new button of type UIButtonCustom with the specified frame, title and background image.

+ (instancetype)buttonWithFrame:(CGRect)frame title:(NSString *)title backgroundImage:(UIImage *)backgroundImage highlightedBackgroundImage:(UIImage *)highlightedBackgroundImage

Parameters

frame

The frame for the button view.

title

The title for UIControlStateNormal.

backgroundImage

The background image for UIControlStateNormal.

highlightedBackgroundImage

The background image for UIControlStateHighlighted

Return Value

A newly create button.

Discussion

Creates and returns a new button of type UIButtonCustom with the specified frame, title and background image.

Declared In

UIButton+TKCategory.h