标签:
_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];
标签:
原文地址:http://www.cnblogs.com/lee4519/p/4305852.html