Nimbus
0.9.3 - Nimbus is proudly hosted on Github
An iOS framework whose growth is bounded by O(documentation).
|
For modifying class implementations at runtime.
See example: Runtime Debugging with Method Swizzling
Functions | |
void | NISwapInstanceMethods (Class cls, SEL originalSel, SEL newSel) |
void | NISwapClassMethods (Class cls, SEL originalSel, SEL newSel) |
NISwapInstanceMethods | ( | Class | cls, |
SEL | originalSel, | ||
SEL | newSel | ||
) |
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.
Definition at line 25 of file NIRuntimeClassModifications.m.
NISwapClassMethods | ( | Class | cls, |
SEL | originalSel, | ||
SEL | newSel | ||
) |
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.
Definition at line 33 of file NIRuntimeClassModifications.m.