class
Returns the class object.
Declaration
+ (Class) class;Return Value
The class object.
Discussion
Refer to a class only by its name when it is the receiver of a message. In all other cases, the class object must be obtained through this or a similar method. For example, here SomeClass is passed as an argument to the isKind(of:) method (declared in the NSObject protocol):
BOOL test = [self isKindOfClass:[SomeClass class]];