码迷,mamicode.com
首页 > 其他好文 > 详细

UISlider

时间:2015-02-28 18:28:42      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:

    _videoSlider = [[UISlider alloc] initWithFrame:

                    CGRectMake(10, 0, 200, 31)];

    [_videoSlider addTarget:self action:@selector(videoSlierChangeValue:)

           forControlEvents:UIControlEventValueChanged];

    [_videoSlider addTarget:self action:@selector(videoSlierChangeValueEnd:)

           forControlEvents:UIControlEventTouchUpInside];

    [topView addSubview:_videoSlider];

 

 

    self.videoSlider.maximumValue = CMTimeGetSeconds(duration);

 

    UIGraphicsBeginImageContextWithOptions((CGSize){ 1, 1 }, NO, 0.0f);

    UIImage *transparentImage = UIGraphicsGetImageFromCurrentImageContext();

    UIGraphicsEndImageContext();

    

    [self.videoSlider setMinimumTrackImage:transparentImage forState:UIControlStateNormal];

    [self.videoSlider setMaximumTrackImage:transparentImage forState:UIControlStateNormal];

UISlider

标签:

原文地址:http://www.cnblogs.com/lee4519/p/4305852.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!