Type Method 型メソッド

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 isKindOfClass: method (declared in the NSObject protocol):


BOOL test = [self isKindOfClass:[SomeClass class]];

See Also 参照

Identifying Classes クラスの識別

Related Documentation 関連文書