Reputation: 3042
I am aware that +(void)load method gets called in ios even before the main function. In my case it is only getting invoked with UIView and not with UITextView.
Getting invoked here :
@implementation UIView (SomeMethodSwizzling)
+(void)load{
}
@end
Not Getting inovked here .
@implementation UITextView (SomeMethodSwizzling)
+(void)load{
}
@end
Upvotes: 3
Views: 666
Reputation: 299355
Usual reason is that you're not actually linking the file. Most common cause is that you don't directly use anything declared in it (you sometimes need to pass -objc
to the linker to fix that). Another cause is you just forgot to add the file to the target (I see that happen a lot).
Upvotes: 1