Instance Method

trackRectForBounds:

Returns the drawing rectangle for the slider’s track.

Declaration

- (CGRect)trackRectForBounds:(CGRect)bounds;

Parameters

bounds

The bounding rectangle of the slider.

Return Value

The computed drawing rectangle for the track. This rectangle corresponds to the entire length of the track between the minimum and maximum value images.

Discussion

You do not call this method directly. Instead, you override it when you want to customize the track rectangle, returning a different rectangle. The returned rectangle is used to scale the track and thumb images during drawing.

See Also

Overrides for Subclasses

- maximumValueImageRectForBounds:

Returns the drawing rectangle for the maximum value image.

- minimumValueImageRectForBounds:

Returns the drawing rectangle for the minimum value image.

- thumbRectForBounds:trackRect:value:

Returns the drawing rectangle for the slider’s thumb image.