I've done this in a small project of mine for a custom progress view. It can be found at lightdesign/LDProgressView. You can take a look at the file LDProgressView.m
for how I've done this.
Here's the relevant line:
label.text = [NSString stringWithFormat:@"%.0f%%", self.progress*100];
This line takes the progress value which is between 0.0
and 1.0
and multiplies it by 100
and then inserts the number up to the whole number (.0
in the format string) with a percentage at the end (%%
in the format string).
Also, if you don't want to manually calculate the percentage, feel free to use the open source control I've made.