How can I debug #39;unrecognized selector sent to instance#39; error(如何调试“发送到实例的无法识别的选择器错误)
问题描述
我正在为我的表格视图创建一个自定义表格单元格视图.在我将自定义单元格(在故事板中)的图像视图快速连接到我的代码后,我收到以下错误.
I am creating a custom table cell view for my table view. After I connect an image view of custom cell (in storyboard) to my code in swift, I get the following error.
你能告诉我如何解决这个错误吗?
Can you please tell me how to resolve this error?
谢谢.
我在我的项目中添加了一个异常断点.
I add an exception breakpoint in my project.
这是断线的地方.
但我的代码中没有使用图像".
But I don't use 'image' in my code.
推荐答案
尝试在-[NSObject(NSObject) doesNotRecognizeSelector:]上设置一个符号断点
.只需单击 Breakpoint Navigator 左下角的 [+]
即可添加断点.然后单击添加符号断点".现在重现您的崩溃应该可以让您更好地了解问题发生在代码中的哪个位置.
Try setting a symbolic breakpoint on -[NSObject(NSObject) doesNotRecognizeSelector:]
. Just click [+]
in the bottom left corner of the Breakpoint Navigator to add a breakpoint. Then click 'Add Symbolic Breakpoint'. Reproducing your crash now should give you a better idea where in your code the issue occurs.
这篇关于如何调试“发送到实例的无法识别的选择器"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!