In the NSObject protocol, it defines a method that is similar to this:
-(Class) class
What type of object is the Class object? Or is it even an object? What can I do with the object? Can I get the base class or adopted protocols?
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 itself a class defined by the Objective-C runtime, akin to theClassclass in Java. For example, you can use the functionclass_getClassName()to get the name of a class:You can do all kinds of introspection/reflection with
Classobjects; see the Objective-C runtime reference for details.