I have math function (about O^(10^7)) and while it searching result I have to display progress. So I have progress bar. The question is, how to update progress bar? I have tried to do it so:
self.progressBar.progress = 0.0;
self->progress = 0.0;
for (1..10^7) {
...
if (self.progressBar.progress < self.progress + 0.01) {
[self updateProgress];
}
}
[self updateProgress];