zoukankan      html  css  js  c++  java
  • Error Set

    1、

    reason: '[<CTXCourseDetailViewController 0x6db4010> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tableview.'

    原因:删除了原来在Storyboard中的 Table View 在 CTXCourseDetailViewController 中的Outlet ‘tableview’。

    2、在Storyboard中,在View Controller 中添加 Table View

    *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "4Kh-Te-V59-view-z5E-sD-s1e" nib but didn't get a UITableView.'

    原因:在对应的控制器 CTXCourseDetailViewController  中,CTXCourseDetailViewController  错误地继承了 UITableViewController 的自定义子类。应继承自 UIViewController。

    3、调试时,Xcode死了,强行关闭重启并运行后报错:

    1 Couldn't register com.Submarinex.App with the bootstrap server. Error: unknown error code.
    2 This generally means that another instance of this process was already running or is hung in the debugger.(lldb) 

    解决:重启电脑。

    4、在新增course的model segue后,在viewDidLoad方法中设置 self.editing = YES; 报错

    1 2012-10-26 19:24:01.669 CT[381:fb03] *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-1914.84/UITableView.m:1037
    2 2012-10-26 19:24:01.758 CT[381:fb03] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.  The number of rows contained in an existing section after the update (1) must be equal to the number of rows contained in that section before the update (1), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'

    在我的project中,解决方法:在 self.editing = YES; 之前添加 [self.tableView reloadData];。

    原因:tableview 最初没有关于数据源和委托的信息。所以需要 reloadData 最为初始化的一部分。

  • 相关阅读:
    查询SQL数据库中表占用资源情况的语句
    修改VMware网卡MAC的方法
    Ajax 与 .net Validator
    控件属性值绑定到数据
    一个设计的小例子警察抓小偷
    加密Web.config 文件中的敏感信息
    VS .Net 2005程序集换名之后的遗留问题
    为ASP.Net 创建和配置应用程序服务数据库
    ArcGIS 9.0 在Windows XP SP2 上安装的问题(数据保护造成的)
    使用客户端脚本
  • 原文地址:https://www.cnblogs.com/submarinex/p/2687767.html
Copyright © 2011-2022 走看看