Search code examples
objective-cintrospectionobjective-c-runtime

Get all methods of an Objective-C class or instance


In Objective-C I can test whether a given class or instance responds to certain selectors. But how can query a class or instance for all its methods or properties of a class (e.g. a list of all methods or properties)?


Solution

  • You'll want to use the Objective C runtime methods, see here: https://developer.apple.com/reference/objectivec/objective_c_runtime