iPhone 设备上的方法 Swizzle
我尝试了 JRSwizzle 和 MethodSwizzle。他们在模拟器上编译得很好,但当我尝试为设备(3.x)编译时抛出一堆错误
有人在iphone上有过运气吗?有什么窍门?
TIA
I tried both JRSwizzle, and MethodSwizzle. They compile fine on the simulator but throw a bunch of errors when I try to compile for Device (3.x)
Has anyone had any luck swizzling on the iphone? Whats the trick?
TIA
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CocoaDev wiki 对方法调配进行了广泛的讨论 此处。 Mike Ash 在该页面的底部有一个相对简单的实现:
我还没有测试过这个,只是因为我认为方法混合是一个极其危险的过程,而且还没有必要使用它。
The CocoaDev wiki has an extensive discussion on method swizzling here. Mike Ash has a relatively simple implementation at the bottom of that page:
I have not tested this, simply because I regard method swizzling as an extremely dangerous process and haven't had the need to use it yet.