I have a method:
@implementation SomeClass
- (void)thisMethod:(ObjectA *)objA {
[APIClient connectToAPIWithCompletionHandler:^(id result){
if (result) [objA methodOne];
else [objA methodTwo];
}];
}
Is it possible to call a method methodOneor methodTwowhen called thisMethod:? Basically, I just want to drown out this method connectToAPIWithCompletionHandler:. I can do this right now using the swizzling connectToAPIWithCompletionHandler:method. But I want to know if there is a better way.
I found a similar question here , but it uses an instance method, whereas in my case it is a class method.
source
share