From bb466be8d4deb0b9f679407b71b75b8484ebabd7 Mon Sep 17 00:00:00 2001 From: xuyouyang Date: Sun, 22 Jul 2018 15:09:34 +0800 Subject: [PATCH] [WEEX-495][iOS] Fix class_replaceMethod param error in WXSwizzleInstanceMethod. --- ios/sdk/WeexSDK/Sources/Utility/WXUtility.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m index 62c0f3e1e3..d9f543384b 100644 --- a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m +++ b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m @@ -83,7 +83,7 @@ void WXSwizzleInstanceMethod(Class className, SEL original, SEL replaced) BOOL didAddMethod = class_addMethod(className, original, method_getImplementation(newMethod), method_getTypeEncoding(newMethod)); if (didAddMethod) { - class_replaceMethod(className, replaced, method_getImplementation(newMethod), method_getTypeEncoding(newMethod)); + class_replaceMethod(className, replaced, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod)); } else { method_exchangeImplementations(originalMethod, newMethod); }