Not really.
Objective-C is object oriented only because it encapsulates data and functionality in one container; class.
That's almost all that is needed for "object-oriented programming."
Now there are many different kinds of object-oriented programming, and one important aspect is whether the language uses dynamic or static dispatch.
In a statically dispatched language - the best example for C ++ (yes, I know that it has virtual methods that give a form of dynamic dispatch) - the method call is connected at compile time and cannot change at run time. That is, the implementation of the method that will be used to make the method call is fixed at compile time and cannot be changed at run time.
With a dynamically distributed language, such as Objective-C, the implementation of the method that will be used to make the method call is determined each time the method is called. Thus, using categories or the runtime API, you can change the implementation of the method while the application is running (for example, it works, for example, as monitoring key values).
objc_msgSend() is a hook that performs dynamic dispatch. It refers to an object or class, and also to the name of the method - the selector or SEL, as it is called - and looks at the implementation of the object or class that belongs to this method name. After the implementation is found, it is called.
If no implementation is found, objc_msgSend() will then take a series of steps to see if the class or instance wants to somehow handle the invocation of an unrecognized method, allowing one object to fall into place for another (proxy) or similar function.
It is much more than that. I would advise you to read the Apple documentation for more information .
bbum
source share