Possible Duplicate:
Purpose of @ Symbol Before Strings?
I've been curious to what @ means before every string is objective C. Is it easier on the compiler, or more efficient in some way?
Example:
NSString* flavour = @"Chocolate"
@"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).
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