Created
October 23, 2014 15:45
-
-
Save OdNairy/5a2c78d5a8741fedc203 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation UIWindow (WLOAnalytics) | |
+(void)load{ | |
Class class = [UIWindow class]; | |
SEL swizzleIt = @selector(sendEvent:); | |
SEL swizzleTo = @selector(WLORuntime_sendEvent:); | |
Method methodIt = class_getClassMethod(class, swizzleIt); | |
Method methodTo = class_getClassMethod(class, swizzleTo); | |
method_exchangeImplementations(methodIt, methodTo); | |
} | |
-(void)WLORuntime_sendEvent:(UIEvent *)event{ | |
[self WLORuntime_sendEvent:event]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment