代码库> 滑杆> 双向滚动slider
双向滚动slider
关注
上传者:小蜗牛快拍 分类:滑杆(Slider)
查看次数:3002 下载次数:289
上传时间:2015-09-15 大小:517 B
双向滚动slider

  [list=a]
#import "WLRangeSlider.h"
(void)viewDidLoad { [super viewDidLoad]; _rangeSlider = [[WLRangeSlider alloc] initWithFrame:CGRectMake(0, 100, 320, 10)]; [_rangeSlider addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged]; [self.view addSubview:_rangeSlider]; }


The Key Point is in "WLRangeSlider.m" in the methord - (void)initLayers
{ //z这里更改时间轴---24为24个小时 _maxValue = 24.0; _minValue = 0.0; _leftValue = 0; _rightValue = 6.5; _leftValue1=21.0; _rightValue1=24; }
next step we initUI

    then change value in the methord of UIcontrol
        (BOOL)beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event
        (BOOL)continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event
        (void)endTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event
        (void)cancelTrackingWithEvent:(UIEvent *)event

测试环境:Xcode 6.2,iOS 6.0 以上
收藏
我来说两句
发表评论
您还没有登录!请登录注册
所有评论(0
提示
sina weixin mail 回到顶部