Declared in UIBarButtonItem+TKCategory.h
UIBarButtonItem+TKCategory.m

Overview

Additional functionality for UIBarButtonItem.

Class Methods

actionItemWithTarget:action:

Creates and returns a Action button bar button item.

+ (UIBarButtonItem *)actionItemWithTarget:(id)target action:(SEL)action

Parameters

target

The object that receives the action message.

action

The action to send to target when this item is selected.

Return Value

The UIBarButtonItem object.

Declared In

UIBarButtonItem+TKCategory.h

activityItem

Creates and returns a UIActivityIndicatorView bar button item. The style is white.

+ (UIBarButtonItem *)activityItem

Return Value

The UIBarButtonItem object.

Declared In

UIBarButtonItem+TKCategory.h

activityItemWithIndicatorStyle:

Creates and returns a UIActivityIndicatorView bar button item.

+ (UIBarButtonItem *)activityItemWithIndicatorStyle:(UIActivityIndicatorViewStyle)style

Parameters

style

The indicator style.

Return Value

The UIBarButtonItem object.

Declared In

UIBarButtonItem+TKCategory.h

barButtonItemWithImage:highlightedImage:target:selector:

Creates and returns a bar button item object using with a button with the specified properties.

+ (UIBarButtonItem *)barButtonItemWithImage:(UIImage *)image highlightedImage:(UIImage *)highlighedImage target:(id)target selector:(SEL)selector

Parameters

image

The normal state image.

highlighedImage

The highlighted state image.

target

The object that receives the action message.

selector

The action to send to target when this item is selected.

Return Value

The UIBarButtonItem object.

Declared In

UIBarButtonItem+TKCategory.h

cancelItemWithTarget:action:

Creates and returns a Cancel button bar button item.

+ (UIBarButtonItem *)cancelItemWithTarget:(id)target action:(SEL)action

Parameters

target

The object that receives the action message.

action

The action to send to target when this item is selected.

Return Value

The UIBarButtonItem object.

Declared In

UIBarButtonItem+TKCategory.h

doneItemWithTarget:action:

Creates and returns a Done button bar button item.

+ (UIBarButtonItem *)doneItemWithTarget:(id)target action:(SEL)action

Parameters

target

The object that receives the action message.

action

The action to send to target when this item is selected.

Return Value

The UIBarButtonItem object.

Declared In

UIBarButtonItem+TKCategory.h

fixedSpaceItemWithWidth:

Creates and returns a fixed width bar button item.

+ (UIBarButtonItem *)fixedSpaceItemWithWidth:(CGFloat)width

Parameters

width

The width of the item;

Return Value

The UIBarButtonItem object.

Declared In

UIBarButtonItem+TKCategory.h

flexibleSpaceItem

Creates and returns a flexible bar button item.

+ (UIBarButtonItem *)flexibleSpaceItem

Return Value

The UIBarButtonItem object.

Declared In

UIBarButtonItem+TKCategory.h

saveItemWithTarget:action:

Creates and returns a Save button bar button item.

+ (UIBarButtonItem *)saveItemWithTarget:(id)target action:(SEL)action

Parameters

target

The object that receives the action message.

action

The action to send to target when this item is selected.

Return Value

The UIBarButtonItem object.

Declared In

UIBarButtonItem+TKCategory.h