When you set or update the float for the progressView does it automatically update the progressView?
such as calling a method:
- (void) updateProgress:(float)progress{
[self.progressView setProgress:progress];}
When you set or update the float for the progressView does it automatically update the progressView?
such as calling a method:
- (void) updateProgress:(float)progress{
[self.progressView setProgress:progress];}
I assume you are talking about UIProgressView?
Assuming that's what you mean the answer is yes, with a caveat.
It doesn't draw your progress view immediately. It tells the progress view that it needs to redraw itself, and the next time through the event loop it does so.
If you try to update the value in a synchronous loop it doesn't work.
So code like this:
for (int value = 0; value < 100; value++
{
[myProgressView setProgress: value/100 animated: YES];
//Do something time-consuming
}
Will not work. Since that code doesn't return until the value is 100, what you would see is the progress view start out at 0, and then suddenly go all the way to 100%.