NimbusKit
1.2.1 - Fork Nimbus on Github - Visit the Nimbus Wiki
The iOS framework that grows only as fast as its documentation
|
Functions | |
void | NISwapInstanceMethods (Class cls, SEL originalSel, SEL newSel) |
void | NISwapClassMethods (Class cls, SEL originalSel, SEL newSel) |
For modifying class implementations at runtime.
See example: Runtime Debugging with Method Swizzling
Swap two class instance method implementations.
Use this method when you would like to replace an existing method implementation in a class with your own implementation at runtime. In practice this is often used to replace the implementations of UIKit classes where subclassing isn't an adequate solution.
This will only work for methods declared with a -.
After calling this method, any calls to originalSel will actually call newSel and vice versa.
Uses method_exchangeImplementations to accomplish this.
Swap two class method implementations.
Use this method when you would like to replace an existing method implementation in a class with your own implementation at runtime. In practice this is often used to replace the implementations of UIKit classes where subclassing isn't an adequate solution.
This will only work for methods declared with a +.
After calling this method, any calls to originalSel will actually call newSel and vice versa.
Uses method_exchangeImplementations to accomplish this.