i’m a noob in Objective C. I’m having the following confusion.
How do i convert a float value obtained from progressView.progress in a string?
I tried this
NSString *progressStatus = [NSString stringWithFormat:@"%f", progressView.progress];
label.text = progressStatus;
But this say EX_BAD_ACCESS
some help please.
Thank You.
The snippet you posted reads correctly. The most likely source of your error is that the
UIProgressViewhas yet to be initialized when this code is called. It is also possible that theUILabelis not correctly set up.If you created these UI elements in the IB, check the connections. If you created them programmatically, then check that they are allocated and initialized correctly.
Also ensure that you are setting the text of the label after the progressView is created.