self.slider=[[UISlider alloc]initWithFrame:CGRectMake(50, 100, 200, 50)];
//self.slider.tintColor=[UIColor blueColor];//已经使用进度条颜色
//数值减小(球左边)颜色
self.slider.minimumTrackTintColor=[UIColor greenColor];//已使用进度条颜色
//数值增大(球右边)颜色
self.slider.maximumTrackTintColor=[UIColor redColor];//总进度条颜色
//图片
//self.slider.maximumValueImage=[UIImage imageNamed:@"1.png"];//右边
//self.slider.minimumValueImage=[UIImage imageNamed:@"2.png"];//左边
//图片颜色
//[self.slider setThumbImage:[UIImage imageNamed:@"1.png"] forState:UIControlStateNormal];
//self.slider.thumbTintColor=[UIColor redColor];
//slider的最大最小值
self.slider.minimumValue=0;
self.slider.maximumValue=100;
[self addSubview:self.slider];