class_getClassMethod(_:_:)
Returns a pointer to the data structure describing a given class method for a given class.
Declaration
func class_getClassMethod(_ cls: AnyClass?, _ name: Selector) -> Method?Parameters
- cls:
A pointer to a class definition. Pass the class that contains the method you want to retrieve.
- name:
A pointer of type Sel. Pass the selector of the method you want to retrieve.
Return Value
A pointer to the Method data structure that corresponds to the implementation of the selector specified by aSelector for the class specified by aClass, or NULL if the specified class or its superclasses do not contain a class method with the specified selector.
Discussion
Note that this function searches superclasses for implementations, whereas class_copyMethodList(_:_:) does not.
See Also
Working with Classes
class_getName(_:)class_getSuperclass(_:)class_setSuperclass(_:_:)class_isMetaClass(_:)class_getInstanceSize(_:)class_getInstanceVariable(_:_:)class_getClassVariable(_:_:)class_addIvar(_:_:_:_:_:)class_copyIvarList(_:_:)class_getIvarLayout(_:)class_setIvarLayout(_:_:)class_getWeakIvarLayout(_:)class_setWeakIvarLayout(_:_:)class_getProperty(_:_:)class_copyPropertyList(_:_:)