What are all of the symbols in obj-c? Like %@, %d, etc. What do they all mean? Thanks
+6
A:
%@
and %d
are format specifiers.
NSString
supports the format characters defined for the ANSI C functionprintf()
, plus@
for any object. If the object responds to thedescriptionWithLocale:
message,NSString
sends that message to retrieve the text representation, otherwise, it sends a description message.
See also: Apple Documentation – FormatStrings.html
The MYYN
2010-09-10 22:57:42
A:
The best response is in the Mac Os X Refrence library.
The big difference between C and Objective C is the %@ symbols. The %@ print as string the return of descriptionWithLocale of an object if available.
ohe
2010-09-10 23:05:30
Funny, all this time I thought the big difference between C and Objective-C was that Objective-C had an object system...
Laurence Gonsalves
2010-09-10 23:55:20
Indeed.... i mean big difference for format specifiers ....
ohe
2010-09-11 07:25:57