Instance Method

backgroundRectForBounds:

Returns the rectangle in which the receiver draws its background.

Declaration

- (CGRect)backgroundRectForBounds:(CGRect)bounds;

Parameters

bounds

The bounding rectangle of the receiver.

Return Value

The bounds rectangle in which to draw any standard button content.

Discussion

The default implementation of this method returns the value in the bounds parameter. This rectangle represents the area in which the button draws its standard background content. Subclasses that provide custom background adornments can override this method and return a modified bounds rectangle to prevent the button from drawing over any custom content.

See Also

Getting Dimensions

- contentRectForBounds:

Returns the rectangle in which the receiver draws its entire content.

- titleRectForContentRect:

Returns the rectangle in which the receiver draws its title.

- imageRectForContentRect:

Returns the rectangle in which the receiver draws its image.