Skip to content

Instantly share code, notes, and snippets.

@matinm
matinm / event_automator.m
Created April 28, 2014 22:46
Automatic event-tracking for iOS analytics.
#import "UIApplication+EventAutomator.h"
#import <objc/runtime.h>
@implementation UIApplication (EventAutomator)
+ (void)load {
Class class = [self class];
SEL originalSelector = @selector(sendAction:to:from:forEvent:);
SEL replacementSelector = @selector(heap_sendAction:to:from:forEvent:);