ZKSwizzle
ZKSwizzle copied to clipboard
Streamlined way to swizzle Objective-C instance and class methods
One benefit of the naive`method_exchangeImp` approach is that we can use standard `objc_msgSend` when calling the original method, which means we benefit from the method cache. However, with ZKSwizzle the...
Just build `ZKSwizzle.h` and `ZKSwizzle.m`, then in `ZKSwizzle.m`, at line 293, there're 2 errors: ``` 'retain' is unavailable: not available in automatic reference counting mode ARC forbids explicit message send...
If ZKSwizzle is used to swizzle `NSObject`'s `respondsToSelector:` infinite recursion occurs leading to a crash. This is because `destinationSelectorForSelector`: uses the `NSString` format specifier `%@` which calls an object's `description:`...