I\'d like to override a method in an Objective C class that I don\'t have the source to.
I\'ve looked into it, and it appears that Categories should allow me to do t
If you will be coding against this class, simply rename the selector to something your code can use, and call the original selector on self:
@implementation SampleClass (filePathResolver)
-(NSString*) myFullPathFromRelativePath:(NSString*) relPath
{
NSString *result = [self fullPathFromRelativePath: relPath];
... do some stuff with the old result
return result;
}
If you want to override the default implementation of this selector for that class, you'll need to use the method swizzling approach.