We're making use of Swizzling in Objective-C. For convenience we're using CoconutKit's helper methods to achieve this:
HLSSwizzleSelectorWithBlock_Begin([TMObjectCache class], @selector(objectForKey:))
^(TMObjectCache *self, NSString *key) {
key = nil;
return ((id (*)(id, SEL, NSString*))_imp)(self, _cmd, key);
}
HLSSwizzleSelectorWithBlock_End;
We'd like to however also un-swizzle this method after some point in the code. Is there a way to do this?