Created
July 8, 2015 09:01
-
-
Save rock88/5724b33657c6955ab219 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Swizzle(Class class, SEL selector, void(^block)()) | |
{ | |
Method method = class_getInstanceMethod(class, selector); | |
//IMP imp = method_getImplementation(method); | |
method_setImplementation(method, imp_implementationWithBlock(block)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment