Objective-C uses dynamic binding, but how?
问题 I know that Objective-C uses dynamic binding for all method calls. How is this implemented? Does objective-c "turn into C code" before compilation and just use (void*) pointers for everything? 回答1: Conceptually, what is going on is that there is a dispatcher library (commonly referred to as the Objective C runtime), and the compiler converts something like this: [myObject myMethodWithArg:a andArg:b ]; into //Not exactly correct, but close enough for this objc_msgSend(myObject,