Instance Method

setBackgroundImage:forState:style:barMetrics:

Sets the background image for the specified state, style, and metrics.

Declaration

- (void)setBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)state style:(UIBarButtonItemStyle)style barMetrics:(UIBarMetrics)barMetrics;

Parameters

backgroundImage

The background image to use for the specified state, style, and metrics.

state

The bar button state.

style

The bar button style.

barMetrics

The bar button metrics.

Discussion

For good results, backgroundImage must be a stretchable image.

See Also

Customizing Appearance

tintColor

The tint color to apply to the button item.

- backButtonBackgroundImageForState:barMetrics:

Returns the back button background image for a given control state and bar metrics.

- setBackButtonBackgroundImage:forState:barMetrics:

Sets the back button background image for a given control state and bar metrics

- backButtonTitlePositionAdjustmentForBarMetrics:

Returns the back button title offset for given bar metrics.

- setBackButtonTitlePositionAdjustment:forBarMetrics:

Sets the back button title offset for given bar metrics

- backButtonBackgroundVerticalPositionAdjustmentForBarMetrics:

Returns the back button vertical position offset for given bar metrics.

- setBackButtonBackgroundVerticalPositionAdjustment:forBarMetrics:

Sets the back button vertical position offset for given bar metrics.

- backgroundVerticalPositionAdjustmentForBarMetrics:

Returns the background vertical position offset for given bar metrics.

- setBackgroundVerticalPositionAdjustment:forBarMetrics:

Sets the background vertical position offset for given bar metrics.

- backgroundImageForState:barMetrics:

Returns the background image for a given state and bar metrics.

- setBackgroundImage:forState:barMetrics:

Sets the background image for a given state and bar metrics.

- backgroundImageForState:style:barMetrics:

Returns the background image for the specified state, style, and metrics.

- titlePositionAdjustmentForBarMetrics:

Returns the title offset for given bar metrics.

- setTitlePositionAdjustment:forBarMetrics:

Sets the title offset for given bar metrics.