Aspects
Aspects copied to clipboard
Delightful, simple library for aspect oriented programming in Objective-C and Swift.
 thanks.
I'm getting `message sent to deallocated instance` after scrolling the tableview (its being reused) ` [UITableView aspect_hookSelector:@selector(dequeueReusableCellWithIdentifier:forIndexPath:) withOptions:AspectPositionAfter usingBlock:^(id info) { UITableViewCell *cell; ``` NSIndexPath *idx = [info arguments][1]; NSInvocation...
Hook both class method and instance method of the same class with 'Aspects', crashed: unrecognized selector sent to class or instance. Xcode9.3 crash demo: https://github.com/zljkevin/AspectsCrashDemo 
```objc NSError *error = nil; NSURL *url = [[NSURL alloc] initWithString:@"https://www.google.com"]; [url aspect_hookSelector:@selector(absoluteString) withOptions:AspectPositionBefore usingBlock:^(id info){ NSLog(@""); } error:&error]; [url absoluteString]; ```
avoid recursion problem while print AspectTracker
``` os_unfair_lock_t ascpect_lock = &(OS_UNFAIR_LOCK_INIT); os_unfair_lock_lock(ascpect_lock); block(); os_unfair_lock_unlock(ascpect_lock); ```
I find some answer like https://github.com/steipete/Aspects/issues/20 https://github.com/steipete/Aspects/issues/27, but I found those can not work, do someone have other solution, thanks!
### Swift Package Manager - iOS: Open Xcode, File->Swift Packages, search input **https://github.com/steipete/Aspects.git**, and then select Version Up to Next Major **1.4.3** < . - Or add dependencies in your...
I hook AppDelehate function application:didFinishLaunchingWithOptions: and options AspectPositionBefore but original implementation don't be call