为什么 WebBaseNetscapePluginView 类的实例不响应 safari4 中的选择器?
我正在使用 Safari 开发一个插件。我按照adblocker源代码来调整WebBaseNetscapePluginView类的method:,
-(id)initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:
但我发现在Safari4中没有响应。为什么?
I am developing a plug-in with Safari. I followed the adblocker sourcecode to swizzle the method:
-(id)initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:
of class WebBaseNetscapePluginView but I found that didn't respond in Safari4. Why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
他们要么删除该方法,更改其选择器,要么将其移至另一个类。他们可能改变了方法的工作方式,或添加了功能,并相应地更改了选择器。
您应该通过调整此方法来提出一个关于您打算做什么的新问题,询问您应该如何做。 Swizzling 这个方法显然不是这样的。
They either removed that method, changed its selector, or moved it to another class. They might have changed how the method works, or added functionality, and changed the selector accordingly.
You should ask a new question with what you intend to do by swizzling this method, asking how you should do it. Swizzling this method clearly isn't it.