Delightful, simple library for aspect oriented programming in Objective-C and Swift.
8.4k
stars
1.26k
forks
source link
Aspects hook firstly and later other AOP framework hook a same method, which will cause crash. #143
Open
WJustin opened 6 years ago
[[UIViewController class] aspect_hookSelector:@selector(viewDidAppear:) withOptions:AspectPositionBefore usingBlock:^(id invoke) { NSLog(@"Aspects viewDidAppear"); } error:NULL];
[AspectsSwizz swizzingInstanceMethodByClass:[UIViewController class]
originSelector:@selector(viewDidAppear:) swizzingSelector:@selector(hook_viewDidAppear:)];
the above code will cause exception. My resolution is the https://github.com/steipete/Aspects/pull/142