Skip to content

dvmrmc/Syringe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Syringe

license platform

Objective-C Syringe for Injection. This library will help you changing method implementation in a class at run time.

Install

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.

Usage

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]];

Author

Contributing

Feel free to add new features by pullrequesting.

License

This library is released under MIT License

About

Objective-C Srynge to help with method injection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published