iPhone : Simple UITableViewController crash without console error nor debugging clue

标签 iphone debugging uitableview console crash

我正在尝试构建一个简单的 TableView 程序结构。
它似乎工作正常,但如果我将列表滚动到高或低,应用程序崩溃而没有任何控制台错误,并且对调试器的跟踪也无济于事。

你可以自己看看我放的项目:http://shine.free.fr/tmp/myTestApp.zip

你能帮助我吗 :

  • 知道出了什么问题
  • 知道如何发现问题所在,而不必每次都询问。通常我会检查我的连接,lokk 是否有编译错误,查看控制台并尝试调试,但那里没有任何帮助。

  • 感谢您的帮助

    最佳答案

    问题是您的 ListController 对象在从 nib 文件加载时没有保留,因此不能保证在加载 nib 后它会有效(实际上不是)。要解决您的问题,请为 ListController 属性添加一个导出并为其定义保留属性。这里是 FenetreListeController.h可以解决您的问题:

    #import <UIKit/UIKit.h>
    
    @class ListeController;
    
    @interface FenetreListeController : UIViewController {
        IBOutlet ListeController* listController;
    }
    
    @property (nonatomic, retain) ListeController* listController;
    @end
    

    您还需要在 IB 中设置 socket 连接并在 .m 文件中合成属性

    有关如何从 xib 文件加载对象的更多信息,请查看 "The Nib Object Life Cycle" “资源编程指南”中的部分

    关于iPhone : Simple UITableViewController crash without console error nor debugging clue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4535223/

    相关文章:

    asynchronous - 如何?带有UIImageView的UITableViewCell通过ASINetworkQueue异步加载

    java - 无法使用任何调试器连接到 Glassfish

    python - 如何逐步调试扭曲?

    ios - 无效更新: invalid number of sections in UITableView

    iphone - Objective-C - 优化这个单例模式?

    Android: View 在调用setContentView R.layout之前显示

    ios - UItableViewCell 内 UIScrollview 中的 UIButton 处理带有数据的事件

    iphone - 调整字体大小以填充 UITextView?

    ios - iOS10 上语音转文字?

    iphone - 为 ios 交叉编译 speex 库