We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1 实现原理详解有下面的代码,是新的IMP,怎么在运行时添加上去的? static void viewDidLoadIMP (id slf, SEL sel) { JSValue *jsFunction = …; [jsFunction callWithArguments:nil]; } 我问的不是这个class_replaceMethod(cls, selector, viewDidLoadIMP, typeDescription);
2 我下面的理解,大家觉得是否正确:-ORIGviewWillAppear: 和 -_JPviewWillAppear,怎么添加上的? 回答,这两个可以当成字符串。第一个,先转成sel,之后class_addMethod指向原来的imp;第二个,先转成sel,之后指向新的imp。所以真正添加的是新的imp,上面两个只是字符串而已。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
1 实现原理详解有下面的代码,是新的IMP,怎么在运行时添加上去的?
static void viewDidLoadIMP (id slf, SEL sel) {
JSValue *jsFunction = …;
[jsFunction callWithArguments:nil];
}
我问的不是这个class_replaceMethod(cls, selector, viewDidLoadIMP, typeDescription);
2 我下面的理解,大家觉得是否正确:-ORIGviewWillAppear: 和 -_JPviewWillAppear,怎么添加上的?
回答,这两个可以当成字符串。第一个,先转成sel,之后class_addMethod指向原来的imp;第二个,先转成sel,之后指向新的imp。所以真正添加的是新的imp,上面两个只是字符串而已。
The text was updated successfully, but these errors were encountered: