I got problems with a progress bar that is not updating (it sticks grey). I got this method to update the progress bar in the MainViewController.m:
- (void)setProgress:(float)prog {
NSLog(@"Progressbar updated, value %f", prog);
self.progressBar.progress = prog;
}
When I call it from inside the class (inside MainViewController.m) using:
// in MainViewController.m
[self setProgress:1.0];
Everything is working great, the bar shows the progress in blue and I get the NSLog output with value.
With this progress bar I want the visualize the processing that I do in a loop that runs in a different class (processing.m), to send the message with the progress to the MainViewController I'm using a protocol:
#import "progressProtocol.h"
@interface MainViewController : UIViewController <progressProtocol>
- (void)setProgress:(float)prog;
@end
and in the processing.m:
// in processing.m
[self.delegate setProgress:1.0];
When I call the setProgress method by sending a message through the protocol I only get the NSLog output with correct value but the progress bar is not moving according to the value!? When I set a breakpoint inside the method I can see that the method is called but the progress bar is not moving.
Inside the loop I'm sending the message with the new value about several hundert times - but no change at the progress bar at all, only NSLog with correct values. Any idea?