Skip to content

Commit

Permalink
[WEEX-495][iOS] Fix class_replaceMethod param error in WXSwizzleInsta…
Browse files Browse the repository at this point in the history
…nceMethod.
  • Loading branch information
xuyouyang authored and cxfeng1 committed Jul 26, 2018
1 parent a3b0225 commit bb466be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit bb466be

Please sign in to comment.