I have a UIProgressView called progTimer that I placed on my View Controller via Interface Builder. On the iOS simulator, the UIProgressView shows up just fine, but when I test it on my iPhone it doesn’t appear.
Here is the code that modifies it.
- (IBAction)scanbtn
{
[progTimer invalidate];//cancels timer if currently running
progTimer=nil;
progNum = 0;
progTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 //timer to update the progress view
target:self
selector:@selector(progIncrease)
userInfo:nil
repeats:YES];
[self scan];
}
-(void) progIncrease
{
progNum = progNum + 0.01;
scanProg.progress = progNum;
if (progNum >=1)
{
[progTimer invalidate];
progTimer=nil;
//[alert show];
}
}
Any ideas? Thanks in advance. .
ALL: For some reason, I changed the style of the Progress View to “Bar” and it shows up fine. No idea what caused the initial problem, but now it works albeit having a different style bar.