| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- //
- // HMVideoSliderView.h
- // BuguLive
- //
- // Created by 范东 on 2018/12/27.
- // Copyright © 2018 xfg. All rights reserved.
- //
- #import "BGBaseView.h"
- NS_ASSUME_NONNULL_BEGIN
- @protocol HMVideoSliderViewDelegate <NSObject>
- @optional
- // 滑块滑动开始
- - (void)sliderTouchBegan:(float)value;
- // 滑块滑动中
- - (void)sliderValueChanged:(float)value;
- // 滑块滑动结束
- - (void)sliderTouchEnded:(float)value;
- // 滑杆点击
- - (void)sliderTapped:(float)value;
- @end
- @interface HMVideoSliderView : BGBaseView
- @property (nonatomic, weak) id<HMVideoSliderViewDelegate> delegate;
- /** 默认滑杆的颜色 */
- @property (nonatomic, strong) UIColor *maximumTrackTintColor;
- /** 滑杆进度颜色 */
- @property (nonatomic, strong) UIColor *minimumTrackTintColor;
- /** 缓存进度颜色 */
- @property (nonatomic, strong) UIColor *bufferTrackTintColor;
- /** 默认滑杆的图片 */
- @property (nonatomic, strong) UIImage *maximumTrackImage;
- /** 滑杆进度的图片 */
- @property (nonatomic, strong) UIImage *minimumTrackImage;
- /** 缓存进度的图片 */
- @property (nonatomic, strong) UIImage *bufferTrackImage;
- /** 滑杆进度 */
- @property (nonatomic, assign) float value;
- /** 缓存进度 */
- @property (nonatomic, assign) float bufferValue;
- /** 是否允许点击,默认是YES */
- @property (nonatomic, assign) BOOL allowTapped;
- /** 设置滑杆的高度 */
- @property (nonatomic, assign) CGFloat sliderHeight;
- /** 是否隐藏滑块(默认为NO) */
- @property (nonatomic, assign) BOOL isHideSliderBlock;
- // 设置滑块背景色
- - (void)setBackgroundImage:(UIImage *)image forState:(UIControlState)state;
- // 设置滑块图片
- - (void)setThumbImage:(UIImage *)image forState:(UIControlState)state;
- // 显示菊花动画
- - (void)showLoading;
- // 隐藏菊花动画
- - (void)hideLoading;
- @end
- @interface HMSliderButton : UIButton
- - (void)showActivityAnim;
- - (void)hideActivityAnim;
- @end
- NS_ASSUME_NONNULL_END
|