#if (defined(USE_UIKIT_PUBLIC_HEADERS) && USE_UIKIT_PUBLIC_HEADERS) || !__has_include() // // UISlider.h // UIKit // // Copyright (c) 2006-2018 Apple Inc. All rights reserved. // #import #import #import #import NS_HEADER_AUDIT_BEGIN(nullability, sendability) @class UIImageView, UIImage; UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos) NS_SWIFT_UI_ACTOR @interface UISlider : UIControl @property(nonatomic) float value; // default 0.0. this value will be pinned to min/max @property(nonatomic) float minimumValue; // default 0.0. the current value may change if outside new min value @property(nonatomic) float maximumValue; // default 1.0. the current value may change if outside new max value @property(nullable, nonatomic,strong) UIImage *minimumValueImage; // default is nil. image that appears to left of control (e.g. speaker off) @property(nullable, nonatomic,strong) UIImage *maximumValueImage; // default is nil. image that appears to right of control (e.g. speaker max) @property(nonatomic,getter=isContinuous) BOOL continuous; // if set, value change events are generated any time the value changes due to dragging. default = YES @property(nullable, nonatomic,strong) UIColor *minimumTrackTintColor API_AVAILABLE(ios(5.0)) UI_APPEARANCE_SELECTOR; @property(nullable, nonatomic,strong) UIColor *maximumTrackTintColor API_AVAILABLE(ios(5.0)) UI_APPEARANCE_SELECTOR; @property(nullable, nonatomic,strong) UIColor *thumbTintColor API_AVAILABLE(ios(5.0)) UI_APPEARANCE_SELECTOR; - (void)setValue:(float)value animated:(BOOL)animated; // move slider at fixed velocity (i.e. duration depends on distance). does not send action // set the images for the slider. there are 3, the thumb which is centered by default and the track. You can specify different left and right track // e.g blue on the left as you increase and white to the right of the thumb. The track images should be 3 part resizable (via UIImage's resizableImage methods) along the direction that is longer - (void)setThumbImage:(nullable UIImage *)image forState:(UIControlState)state; - (void)setMinimumTrackImage:(nullable UIImage *)image forState:(UIControlState)state; - (void)setMaximumTrackImage:(nullable UIImage *)image forState:(UIControlState)state; - (nullable UIImage *)thumbImageForState:(UIControlState)state; - (nullable UIImage *)minimumTrackImageForState:(UIControlState)state; - (nullable UIImage *)maximumTrackImageForState:(UIControlState)state; @property(nullable,nonatomic,readonly) UIImage *currentThumbImage; @property(nullable,nonatomic,readonly) UIImage *currentMinimumTrackImage; @property(nullable,nonatomic,readonly) UIImage *currentMaximumTrackImage; // lets a subclass lay out the track and thumb as needed - (CGRect)minimumValueImageRectForBounds:(CGRect)bounds; - (CGRect)maximumValueImageRectForBounds:(CGRect)bounds; - (CGRect)trackRectForBounds:(CGRect)bounds; - (CGRect)thumbRectForBounds:(CGRect)bounds trackRect:(CGRect)rect value:(float)value; @end NS_HEADER_AUDIT_END(nullability, sendability) #else #import #endif