I get the following error no matter where instantiate a progress bar when it calls set progress:
[UIProgressView setProgress:animated:]: unrecognized selector sent to
instance 0x5b34190′[progressView setProgress:0.5 animated:YES]; //exception is raise here
I just don’t understand why, here is the code:
UIProgressView *pv = [[UIProgressView alloc]initWithProgressViewStyle:UIProgressViewStyleBar];
[pv setProgress:0.5 animated:YES];
[self.view addSubview:pv];
This code, “as is” should work perfectly. The only condition that could prevent it from working is noted in the docs:
Are you sure you’re with iOS 5?