I am trying to increment progress bar and show percentage on a label. However, both remains without changes when "incrementaProgres" function is called. IBOutlets
are properly linked on xib
and also tested that, when function is called, variables have proper value. Thanks
from delegate:
loadingViewController *theInstanceP = [[loadingViewController alloc] init];
[theInstanceP performSelectorOnMainThread:@selector(incrementaProgres:) withObject:[NSNumber numberWithFloat:0.15] waitUntilDone:YES];
loadingView class:
- (void)viewDidLoad
{
[super viewDidLoad];
[spinner startAnimating];
[progress setProgress:0.0];
}
- (void)incrementaProgres: (CGFloat)increment{
[progress setProgress:(progresInc + increment)];
carrega.text = [NSString stringWithFormat: @"%f", (progresInc + increment)];
}