設置slider當前位置的圖像 [slider setThumbImage:[UIImage imageNamed:@"dd.png"] forState:UIControlStateNormal];設置起始的顏色 [slider setMinimumTrackTintColor:[ComHelpe... ...
設置slider當前位置的圖像
[slider setThumbImage:[UIImage imageNamed:@"dd.png"] forState:UIControlStateNormal];
設置起始的顏色
[slider setMinimumTrackTintColor:[ComHelper colorWithHex:SYSTEM_BLUE_COLOR]]
設置末尾的顏色
[slider setMaximumTrackTintColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:0.5]]
設置為豎直的
slider.transform = CGAffineTransformMakeRotation(-M_PI_2);
重新設置slider的frame,並且設置為數值的
一定要先設置transform為標準的,在設置frame,再設置transformslider.transform = CGAffineTransformIdentity; slider.frame = CGRectMake(0, 0, sliderLength, 20); [slider setCenter:CGPointMake(xCenter, yCenter)]; slider.transform = CGAffineTransformMakeRotation(-M_PI_2);