我刚刚为旧项目做了一些工作。IMP 实例存在编译时错误:
在寻找原因和解决方案时,我遇到了以下链接:
https://developer.apple.com/forums/thread/666701
但是这些并没有帮助我理解解决方案。应该怎么做才能摆脱错误?
我刚刚为旧项目做了一些工作。IMP 实例存在编译时错误:
在寻找原因和解决方案时,我遇到了以下链接:
https://developer.apple.com/forums/thread/666701
但是这些并没有帮助我理解解决方案。应该怎么做才能摆脱错误?
https://developer.apple.com/forums/thread/666988给出的解决方案对我有用。有一些警告,但至少构建是成功的。
id (*grannyImp)(Class, SEL) = (id(*)(Class,SEL))class_getMethodImplementation(granny, _cmd);
//IMP grannyImp = class_getMethodImplementation(granny, _cmd);
grannyImp(self, _cmd);