Tag Archives: class loading

Class loading, initialization and method swizzling

Rarely iOS and OS X developers might need to do initialization before their class is used. This might be called as “static constructors” in other development paradigms. Objective-C runtime also offers similar mechanisms which we will discuss in this topic.

NSObject class defines two class methods responsible for class initialization:

+(void)load;
+(void)initialize;

Continue reading

Advertisements