提示Thread1 signal SIGABRT

andylist 2015-09-05 10:32:07
跟着书学习《精通ios开发(第6版)》学到第8章,8.3定制表视图单元,代码写完后,要模拟器中运行时出现以下提示:
Thread1 signal SIGABRT
请问是什么原因啊,本想上传整个工程的代码,又不知如何上传。
请看图
...全文
256 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
andylist 2015-10-13
  • 打赏
  • 举报
回复
经过多次搜索,最后发现解决方法是:选中main.storyboard,找到use size classes取消勾选,即可正常运行,但再次勾上,亦可正常运行,这应该是xcode的bug吧?
ttt1985 2015-09-06
  • 打赏
  • 举报
回复
CellTableIdentifier 这个值时nil ,肯定是有问题的
悠着点少年 2015-09-05
  • 打赏
  • 举报
回复
你的cell是用xib的还是纯代码写的????
andylist 2015-09-05
  • 打赏
  • 举报
回复
请看: unable to dequeue a cell with identifier CellTableIdentifier - must register a nib or a class for the identifier or connect a prototype cell in a storyboard 提示说我没注册,可是我有注册啊 UITableView *tableView = (id)[self.view viewWithTag:1]; [tableView registerClass:[NameAndColorCell class] forCellReuseIdentifier:CellTableIdentifier]; 谁能告诉我,是哪里出了错?谢谢!!!
andylist 2015-09-05
  • 打赏
  • 举报
回复
UITableView *tableView = (id)[self.view viewWithTag:1]; [tableView registerClass:[NameAndColorCell class] forCellReuseIdentifier:CellTableIdentifier]; tableView.rowHeight = 65; //UINib *nib = [UINib nibWithNibName:@"BIDNameAndColorCell" bundle:nil]; //[tableView registerNib:nib forCellReuseIdentifier:CellTableIdentifier]; UIEdgeInsets contentInset = tableView.contentInset; contentInset.top = 20; [tableView setContentInset:contentInset];
andylist 2015-09-05
  • 打赏
  • 举报
回复
2015-09-05 15:31:39.015 Cells[2672:90960] *** Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-3347.44.2/UITableView.m:6245 2015-09-05 15:31:39.020 Cells[2672:90960] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier CellTableIdentifier - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'

29,027

社区成员

发帖
与我相关
我的任务
社区描述
主要讨论与iOS相关的软件和技术
社区管理员
  • iOS
  • 大熊猫侯佩
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧