Objective-C Syringe for Injection. This library will help you changing method implementation in a class at run time.
Download the source code, clone it or submodule it. Everything you need is under "Syringe" folder. Drag & Drop it to your project to start working with this tasty code.
You can modify any class method implementation using the 'injectedClassMethod:fromClass:toMethod:fromClass:'
[Syringe injectClassMethod:@selector(<SOURCE_METHOD_SELECTOR>)
fromClass:[<SOURCE_METHOD_CLASS> class]
toMethod:@selector(<TARGET_METHOD_SELECTOR>)
fromClass:[<TARGET_METHOD_CLASS> class]];
You can restore any modification by invoking the 'restoreClassMethod:fromClass:'
[Syringe resetClassMethod:@selector(<TARGET_METHOD_SELECTOR>
fromClass:[<TARGET_METHOD_CLASS> class]];
- Created by David Martin
Feel free to add new features by pullrequesting.
This library is released under MIT License