Stinger
Stinger copied to clipboard
Stinger is a high-efficiency library with great compatibility, for aop in Objective-C, using libffi instead of Objective-C message forwarding. It is 20+ times faster than the Aspects, from message-se...
```objc NSURL *url = [[NSURL alloc] initWithString:@"https://www.google.com"]; [url st_hookInstanceMethod:@selector(absoluteString) option:(STOptionBefore) usingIdentifier:@"123" withBlock:^(id params) { NSLog(@""); }]; [url absoluteString]; ```
NSRange参数支持有问题
怎么样hook方法在方法执行之前修改参数
when I put the following code in category or homeViewController, the app will crash: [UIFont st_hookClassMethod:@selector(systemFontOfSize:) option:(STOptionInstead) usingIdentifier:(@"myHook_fontWithSize") withBlock:^UIFont * (id params, CGFloat oldPara){ UIFont *oldRet; [params invokeAndGetOriginalRetValue:&oldRet]; CGFloat newSize...
感觉不兼容的话子类里关联的空 hookInfoPool 有点浪费了 😂
支持修改被Hook方法的参数
这应该是一个很通用的能力,自己支持了下,欢迎CR:https://github.com/eleme/Stinger/pull/25