eapinZhang

Results 2 comments of eapinZhang

您好,这个是项目里面通过swizzle替换后的方法,现在这个方法里面有问题,想通过jspatch来修复,目前jspatch支持修改swizzle替换的方法吗? - (void)custom_sendAction:(SEL)action to:(id)target forEvent:(UIEvent *)event { if (![SnailPrefrense sharedSnailPrefrense].isNoClickVoice && !self.isNoVoice) { NSURL *fileURL = [[NSBundle mainBundle] URLForResource:@"SnailMenu.mp3" withExtension:nil]; if (self.isGood) { fileURL = [[NSBundle mainBundle] URLForResource:@"SnailGood.mp3" withExtension:nil]; }...

- (void)load { Method systemMethod = class_getInstanceMethod(self, @selector(sendAction:to:forEvent:)); SEL sysSEL = @selector(sendAction:to:forEvent:); Method customMethod = class_getInstanceMethod(self, @selector(custom_sendAction:to:forEvent:)); SEL customSEL = @selector(custom_sendAction:to:forEvent:); BOOL didAddMethod = class_addMethod(self, sysSEL, method_getImplementation(customMethod), method_getTypeEncoding(customMethod)); if (didAddMethod)...