Instance Method

setBackgroundImage:forState:

Sets the background image for the control when it is in the specified state.

Declaration

- (void)setBackgroundImage:(UIImage *)image forState:(UIControlState)state;

Parameters

image

The background image to use for the specified state.

state

The control state in which you want to display the image.

Discussion

For good results, image must be a stretchable image.

See Also

Customizing Appearance

- backgroundImageForState:

Returns the background image associated with the specified control state.

- decrementImageForState:

Returns the image used for the decrement glyph of the control.

- setDecrementImage:forState:

Sets the image to use for the decrement glyph of the control.

- dividerImageForLeftSegmentState:rightSegmentState:

Returns the divider image for the given combination of left and right states.

- setDividerImage:forLeftSegmentState:rightSegmentState:

Sets the image to use for the given combination of left and right states.

- incrementImageForState:

Returns the image used for the increment glyph of the control.

- setIncrementImage:forState:

Sets the image to use for the increment glyph of the control