https://github.com/aryaxt/ocmethodinterceptor
NSObject category to intercept methods
https://github.com/aryaxt/ocmethodinterceptor
Last synced: 5 months ago
JSON representation
NSObject category to intercept methods
- Host: GitHub
- URL: https://github.com/aryaxt/ocmethodinterceptor
- Owner: aryaxt
- Created: 2013-08-06T05:56:18.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-08-08T13:44:14.000Z (almost 13 years ago)
- Last Synced: 2024-12-29T23:22:04.696Z (over 1 year ago)
- Language: Objective-C
- Size: 418 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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
-------------------------
```objective-c
Car *car = [[Car alloc] init];
[car interceptMethod:@selector(startEngine) withExecuteBlock:^(id instance){
NSLog("Intercepted startEngine method");
}andExecutionType:BlockExecutionTypeBeforeOriginalCall];
[car startEngine];
```