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)? 回答1: You'll want to use the Objective C runtime methods, see here: https://developer.apple.com/reference/objectivec/objective_c_runtime 回答2: You can do this and it is extremely well documented at https://developer.apple.com/library/mac/documentation/cocoa/Reference