// Add the selector as being modified.
currentClass = klass;
AspectTracker parentTracker = nil;
do {
AspectTracker tracker = swizzledClassesDict[currentClass];
if (!tracker) {
tracker = [[AspectTracker alloc] initWithTrackedClass:currentClass parent:parentTracker];
swizzledClassesDict[(id)currentClass] = tracker;
}
[tracker.selectorNames addObject:selectorName];
// All superclasses get marked as having a subclass that is modified.
parentTracker = tracker;
}while ((currentClass = class_getSuperclass(currentClass)));
Please tell me why I do it.
AController:UIViewController
(void)buttonClick;
BController:UIViewController
(void)buttonClick;
AController aspect: buttonClick
BCotroller aspect: buttonClick
exception: Error: buttonClick already hooked in UIViewController
// Add the selector as being modified. currentClass = klass; AspectTracker parentTracker = nil; do { AspectTracker tracker = swizzledClassesDict[currentClass]; if (!tracker) { tracker = [[AspectTracker alloc] initWithTrackedClass:currentClass parent:parentTracker]; swizzledClassesDict[(id)currentClass] = tracker;
}
[tracker.selectorNames addObject:selectorName];
// All superclasses get marked as having a subclass that is modified.
parentTracker = tracker;
}while ((currentClass = class_getSuperclass(currentClass)));
Please tell me why I do it.
AController:UIViewController
BController:UIViewController
AController aspect: buttonClick
BCotroller aspect: buttonClick exception: Error: buttonClick already hooked in UIViewController