KBSlider.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // KBSlider.h
  3. // KBSlider
  4. //
  5. // Created by Kevin Bradley on 12/25/20.
  6. // Copyright © 2020 nito. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. typedef NS_ENUM(NSInteger, DPadState) {
  11. DPadStateSelect,
  12. DPadStateRight,
  13. DPadStateLeft,
  14. DPadStateUp,
  15. DPadStateDown,
  16. };
  17. @interface KBSlider : UIControl
  18. @property CGFloat value;
  19. @property CGFloat minimumValue;
  20. @property CGFloat maximumValue;
  21. @property(nonatomic,getter=isContinuous) BOOL continuous;
  22. @property UIColor *maximumTrackTintColor;
  23. @property UIColor *minimumTrackTintColor;
  24. @property UIColor *thumbTintColor;
  25. @property CGFloat focusScaleFactor;
  26. @property CGFloat stepValue;
  27. @property UIImage *currentMinimumTrackImage;
  28. @property UIImage *currentMaximumTrackImage;
  29. @property CGFloat storedValue;
  30. - (UIImage *)currentThumbImage;
  31. - (void)setValue:(CGFloat)value animated:(BOOL)animated;
  32. - (void)setMinimumTrackImage:(UIImage *)minTrackImage forState:(UIControlState)state;
  33. - (void)setMaximumTrackImage:(UIImage *)maxTrackImage forState:(UIControlState)state;
  34. - (void)setThumbImage:(UIImage *)thumbImage forState:(UIControlState)state;
  35. - (UIImage *)minimumTrackImageForState:(UIControlState)state;
  36. - (UIImage *)maximumTrackImageForState:(UIControlState)state;
  37. - (UIImage *)thumbImageForState:(UIControlState)state;
  38. @end
  39. NS_ASSUME_NONNULL_END