Dave DeLong Dave DeLong - 6 months ago 25
Objective-C Question

Obtain list of class methods for an arbitrary class

How can I get the list of class methods for a particular Class? I've tried using the

function declared in
, but that's only giving me instance methods. I've also found a function that gives me a Method for a class method, but only if I have the selector to the method first (

Any ideas?




class_copyMethodList returns the instance methods of the passed class. The class methods are actually instance methods of the class's metaclass.

The solution to your problem is included right in the API Documentation for class_copyMethodList.