Skip to content
NSObject category to intercept methods
Objective-C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
OCMethodInterceptor.xcodeproj
OCMethodInterceptor
OCMethodInterceptorTests
README.md

README.md

OCMethodInterceptor

NSObject category to intercept methods. Allows intercepting before or after original method calls, or it gives an option to completely override the original call.

Examples

  Car *car = [[Car alloc] init];

  [car interceptMethod:@selector(startEngine) withExecuteBlock:^(id instance){
                NSLog("Intercepted startEngine method");
    }andExecutionType:BlockExecutionTypeBeforeOriginalCall];

  [car startEngine];
Something went wrong with that request. Please try again.