38 lines
1.7 KiB
Objective-C
38 lines
1.7 KiB
Objective-C
//
|
|
// YSlider.h
|
|
// YSlider
|
|
//
|
|
// Created by apple on 16/7/20.
|
|
// Copyright © 2016年 yuanHongQiang. All rights reserved.
|
|
//
|
|
|
|
/**************************
|
|
说明:本Slider对 UIControlEventValueChanged
|
|
UIControlEventTouchDown
|
|
UIControlEventTouchUpInside
|
|
UIControlEventTouchUpOutside
|
|
这4种状态改变消息提供了友好支持,至于其它的状态,暂未支持,因为没必要
|
|
**************************/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
#import "UIViewExt.h"
|
|
@interface YSlider : UIControl
|
|
@property(nonatomic)CGFloat value;//默认是0.0
|
|
@property(nonatomic)BOOL continues;//默认是YES 是否不断的发送值改变的事件
|
|
@property(nonatomic,assign)CGSize thumbSize;//滑块尺寸,默认为25,25
|
|
@property(nonatomic,assign)BOOL thumbBeRound;//滑块要不要变圆形,默认为YES
|
|
@property(nonatomic,assign)CGFloat trackHeight;//轨道高度,默认为3
|
|
@property(nonatomic,assign)BOOL hideThumb;//默认是NO 是否隐藏滑块,隐藏之后,就成了一个纯粹的进度条了
|
|
@property(nonatomic,assign)BOOL canChangeValueByTouch;//是否可以通过点击任意位置来改变滑块的值,默认是NO,不允许
|
|
|
|
- (void)setValue:(CGFloat)value animated:(BOOL)animated;
|
|
|
|
- (void)setThumbImage:(nullable UIImage *)image forState:(UIControlState)state;
|
|
- (void)setMinimumTrackImage:(nullable UIImage *)image forState:(UIControlState)state;
|
|
- (void)setMaximumTrackImage:(nullable UIImage *)image forState:(UIControlState)state;
|
|
|
|
- (void)setThumbColor:(nullable UIColor *)color forState:(UIControlState)state;
|
|
- (void)setMinimumTrackColor:(nullable UIColor *)color forState:(UIControlState)state;
|
|
- (void)setMaximumTrackColor:(nullable UIColor *)color forState:(UIControlState)state;
|
|
@end
|