ICMethodDigger 中文说明
An easy way to print almost methods including private methods (supported arm64 architecture devices).
- iOS 8.0+
- arm64 Device
pod 'ICMethodDigger'
Drag all files under Source
folder to your project, and set build architecture to arm64
.
#import "ICMethodDigger.h"
FOUNDATION_EXTERN void icm_logMethod(Class cls, ICConditionBlock condition, _Nullable ICBeforeBlock before, _Nullable ICAfterBlock after);
icm_logMethod([ViewController class], ^BOOL(SEL sel) {
NSLog(@"%@", NSStringFromSelector(sel));
return NO;
}, nil, nil);
icm_logMethod([ViewController class], ^BOOL(SEL sel) {
NSLog(@"%@", NSStringFromSelector(sel));
return YES;
}, nil, nil);
icm_logMethod([UIViewController class], ^BOOL(SEL sel) {
return YES;
}, nil, ^(id target, SEL sel, NSArray *args, NSTimeInterval interval, id retValue) {
NSLog(@"target:%@ sel:%@ interval: %f", target, NSStringFromSelector(sel), interval);
});
Issues and pull requests are welcome!
ICMethodDigger is available under the MIT license. See the LICENSE file for more info.