i am wondering how i do a % sign within a NSString, i have tried \%
and \\%
The @ symbol is used in a few places in Objective-C, and basically it's a way to signal that whatever it's attached to is special to Objective-C and not part of regular C. This is important when the computer compiles Objective-C code.
@"Chocolate" is just a shortcut to create an NSString instance. You could also use: [[NSString alloc] initWithUTF8String:"Chocolate"]; If you didn't use the @ you would create a C string ( char array). Follow this answer to receive notifications.
Try %%
.
Short question, short answer. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With