Anyone can point out a documentation or a detailed discussion using @class.
I’ve been using this but haven’t really fully understood it.
I want to learn more about it and fully understand it.
Thank you in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
@classis used to declare a class. Essentially telling the compiler: “Hey, there is a class with this name somewhere in the source code. The definition will come later, but let me use its name as a pointer type for now.”See also:
developer.apple.com
SO: Class vs Import
MacRumors
Note: As pointed out by Richard J. Ross III, the
@classkeyword allows for circular references (when two classes both depend on each-other) without breaking the build.