0

In some working code, I had a call to PushViewController, which loaded (successfully) a new view from an xib.

I went into the XIB and added a couple of buttons. Retried the code, and the view continued to be displayed at the appropriate point in the code.

I then deleted those buttons, and since that point, the code no longer works. It now crashes with an unhandled exception error. I can't track it through the debugger - it takes a few steps into the code and crashes.

I've probably disconnected something in IB, but I don't know what.

Can anyone offer any suggestions as to what I've broken, and how to fix it?

Thanks in advance for your assistance.

4

4 回答 4

0

它现在因未处理的异常错误而崩溃

有什么例外?

调试器控制台中的输出将解释问题所在。

于 2009-12-03T05:39:54.900 回答
0

确保您没有错误地断开 XIB 视图与文件所有者的连接。可能是一个插座或不是,但视图仍然需要连接。

  • 连接检查器并确保它在那里。
  • 或检查是否有任何其他丢失的连接。

不知道您的 XIB 的详细信息很难说,但这通常是常见的情况。

于 2009-12-03T05:45:48.507 回答
0

大多数崩溃都发生在过早释放的内存中。

  • 你检查过你的内存管理吗?
  • 崩溃代码是什么?
  • 即使在调试器中运行程序也无法追踪吗?
于 2009-12-03T05:32:12.750 回答
0

如果您认为自己在 IB 中搞砸了,请查看每个元素的 Connections Inspector (cmnd + 2)。

于 2009-12-03T05:33:37.783 回答