Xcode UIProgressBar does not increment
cocoa-touch, ios, iphone, objective-c, uiprogressview
Solution
Progress bar's progress value is between `0.0` and `1.0`, your code sets it in the increments of `15.0`, which is out of range. Your increment should be `0.15`, not `15.0`.
Problem
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)]; } ```