VIAnalyticsKit
VIAnalyticsKit copied to clipboard
+load method in the category should be guarantee execute onlyonce
-
(void)load { Method delegateOriginalMethod = class_getInstanceMethod([self class], @selector(setDelegate:)); Method delegateSwizzledMethod = class_getInstanceMethod([self class], @selector(vi_setDelegate:));
method_exchangeImplementations(delegateOriginalMethod, delegateSwizzledMethod); }