danielamitay / DACircularProgress

DACircularProgress is a UIView subclass with circular UIProgressView properties.
Other
2.38k stars 341 forks source link

is it possible to set maximum and minimum value? #66

Open karthisiva opened 9 years ago

karthisiva commented 9 years ago

hi,your library is awesome.I need to set maximum value and minimum value. I am trying this code for setting 2mins as maximum value.

-(void)progressChange{ //CGFloat progress = self.largeProgressView.progress+(totalOne/100)+0.011; CGFloat progress = self.largeProgressView.progress+(totalOne/1000)+0.0083;

NSLog(@"totttal------>%d",totalOne);

if (totalOne>0) {
    n=n+1;
    totalOne--;
    [self.largeProgressView setProgress:progress animated:YES];

}else{
    [self.timer invalidate];
    self.largeProgressView.progress=0;
    NSLog(@"%d",n);
    NSLog(@"completed");
}

}

where total one is 120 secs.

My value is static so i going with this and working fine.. If i have any other value i need to change this.is there any property for setting maximum value?