Reputation: 655
Is there any way to set the maximum value of a CERoundProgressView
object to be less than 1.0 - something like 0.5?
Reference: CERoundProgressView
Upvotes: 1
Views: 175
Reputation: 9012
You could always subclass CERoundProgressView, add properties for max and min.
@property (nonatomic, weak) float max;
@property (nonatomic, weak) float min;
set max to 0.5, set min to be 0.1 if you want
Then, override setProgress:(float)progress animated:(BOOL)animated;
with something like this:
- (void) setProgress:(float)progress animated:(BOOL)animated {
float value = ((progress - self.min) / (self.max - self.min) ) * (1.0 - 0.0);
[super setProgress:value animated:animated];
}
Upvotes: 1
Reputation:
There seems to be no property to alter the range of the progress. However, since this project is opensource, you can easily adjust the class to use simple linear interpolation.
Upvotes: 0