What are isKindOfClass and isMemberOfClass for?
Essence
Both are runtime introspection of an object's type (from the NSObject protocol):
isKindOfClass:—YESif the object is an instance of the class or any of its subclasses. Walks thesuperclasschain.isMemberOfClass:—YESonly ifobject_getClass(obj)equals exactly this class. Subclasses do not count.
For protocols the analogue is conformsToProtocol:, for methods — respondsToSelector:.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep