* is used for indicating pointers, because Obj-C is based on C language and C language having pointers. Since all object variables are pointers that's needed for each and every object. and
@ is used to identify NSString literals. If we will not use @ sign then it will be a C string. @ is a compiler directive which tell the compiler that this string is an Objective-C string. NSString and C strings are different so @ sign is used to differentiate them. but sometimes it relates to code or file constructs like @interface, @protocol, @implementation, and @end.
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
* is used for indicating pointers, because Obj-C is based on C language and C language having pointers. Since all object variables are pointers that's needed for each and every object. and
@ is used to identify NSString literals. If we will not use @ sign then it will be a C string. @ is a compiler directive which tell the compiler that this string is an Objective-C string. NSString and C strings are different so @ sign is used to differentiate them. but sometimes it relates to code or file constructs like @interface, @protocol, @implementation, and @end.