Tutorial by Examples

It's possible to attach an object to an existing object as if there was a new property. This is called association and allows one to extend existing objects. It can be used to provide storage when adding a property via a class extension or otherwise add additional information to an existing object. ...
The Objective-C runtime allows you to change the implementation of a method at runtime. This is called method swizzling and is often used to exchange the implementations of two methods. For example, if the methods foo and bar are exchanged, sending the message foo will now execute the implementation...
If you need to call an Objective-C method from C code, you have two ways: using objc_msgSend, or obtaining the IMP (method implementation function pointer) and calling that. #import <objc/objc.h> @implementation Example - (double)negate:(double)value { return -value; } - (doubl...

Page 1 of 1