TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Alexander Gusev.
Dynamic class creation and runtime subclassing as a more granular and reversible alternative to method swizzling.
SGVObjcMixin allows to 'mix in' instance methods from another class into any existing object (of any class). The class being mixed in should meet certain requirements, namely:
This mixin approach can be used as an object-scoped (versus class-scoped), opt-in alternative to method swizzling. It is also arguably easier to reverse at runtime if needed.
Use the provided SGVObjcMixin category on NSObject to mixin and un-mixin instance methods from other classes.
Alexander Gusev, [email protected]
SGVObjcMixin is available under the MIT license. See the LICENSE file for more info.