Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All superclasses get marked as having a subclass that is modified. #150

Open
mislsl opened this issue Aug 1, 2018 · 0 comments
Open

All superclasses get marked as having a subclass that is modified. #150

mislsl opened this issue Aug 1, 2018 · 0 comments

Comments

@mislsl
Copy link

mislsl commented Aug 1, 2018

// 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant