The character "%" did not print on objective-c

Possible duplicate:
How to add percent sign in NSString

Hello!

I am trying to print "red (10.0%)" in Objective-C. For this, I used the operator as

    $ newlabel1.text= [[NSString alloc] initWithFormat:@"red (%.1f %)",rv];

but I get a red (10.0) character only% was not printed,

please help me how to print the% character

thanx in advance

+5
source share
1 answer

You must double the percent sign (%%).

+24
source

All Articles