Assigns a maximum track image to the specified control states.
SDKs
- iOS 2.0+
- Mac Catalyst 13.0+
Framework
- UIKit
Declaration
- (void)setMaximumTrackImage:(UIImage *)image forState:(UIControl State)state;
Parameters
image
The maximum track image to associate with the specified states.
state
The control state with which to associate the image.
Discussion
Because the movement of the slider’s thumb changes the width of the area occupied by the maximum track image, the image width must change accordingly. To accommodate this requirement, specify track images as stretchable images that can grow or shrink to fill the available space. For information about how to create stretchable images, see UIImage
.
When you specify a custom maximum track image, the slider ignores the custom maximum track tint color, if any.