Function

class_getInstanceMethod(_:_:)

Returns a specified instance method for a given class.

Declaration

func class_getInstanceMethod(_ cls: AnyClass!, _ name: Selector!) -> Method!

Parameters

aClass

The class you want to inspect.

aSelector

The selector of the method you want to retrieve.

Return Value

The method 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 an instance method with the specified selector.

Discussion

Note that this function searches superclasses for implementations, whereas class_copyMethodList(_:_:) does not.