I am wondering how I make the% sign inside NSString, I tried \% and \\%
\%
\\%
Try %% .
%%
Short question, short answer. :)
just put %% on using the% sign in object c.
There is no special exception for percent signs. Just write:
str = @"Rate of Return (in %)";
... if you do not mean NSString stringWithFormat. But your question does not say that.
According to the Apple String Format Specifiers page, just use %% .
For example:
NSString * aString = @"50%%";
Link: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html