Created
November 18, 2011 19:29
-
-
Save terinjokes/1377503 to your computer and use it in GitHub Desktop.
class_getInstanceMethod returns NULL
This file contains 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
@implementation RVRenderHandler (PPSlowTransition) | |
+ (void) initialize | |
{ | |
Method method = nil; | |
method = class_getInstanceMethod([self class], @selector(setTransitionTime:)); | |
method->method_name = @selector(_original_setTransitionTime:); | |
// the above works | |
method = class_getInstanceMethod([self class], @selector(_ppst_setTransitionTime:)); // returns NULL | |
method->method_name = @selector(setTransitionTime:); | |
} | |
- (void) _ppst_setTransitionTime:(float)time | |
{ | |
NSLog(@"%f", time); | |
[self _original_setTransitionTime:time]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment