Find out if an Objective-C class overrides a method [duplicate]
This question already has an answer here: Objective-C detect if class overrides inherited method 2 answers How can I find out, at runtime, if a class overrides a method of its superclass? For example, I want to find out if a class has it's own implementation of isEqual: or hash , instead of relying on a super class. You just need to get a list of the methods, and look for the one you want: #import <objc/runtime.h> BOOL hasMethod(Class cls, SEL sel) { unsigned int methodCount; Method *methods = class_copyMethodList(cls, &methodCount); BOOL result = NO; for (unsigned int i = 0; i < methodCount;