I have completed "Your Second iOS App"只有在iPhone模拟器完成启动并在Xcode中看到signal SIGABRT
之前执行失败。Xcode教程抛出执行错误
在教程页面的底部,列出了所有.h和.m文件。我注意到了两件奇特的事情。
(1)在上市两个文件在本教程中都从来没有提过,也没有故事板文件(但我想这样的文件是不可再生): AddSightingViewController.h AddSightingViewController.m
(2 )自动创建的两个appDelegate文件未列出,但在教程中从未提及(或使用过)。
有没有人成功运行过他们的第二个教程? 任何人都可以从下面的错误报告中看到什么可能是错误的? 注意,错误是“的UITableView数据源必须的tableView返回细胞:的cellForRowAtIndexPath:”
2013-01-06 16:14:47.771 BirdWatching[47304:11303] *** Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-2372/UITableView.m:5471
2013-01-06 16:14:47.773 BirdWatching[47304:11303] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'
*** First throw call stack:
(0x1c92012 0x10cfe7e 0x1c91e78 0xb65f35 0xcd26b 0x61a5c 0xcd0cb 0xd1f69 0xd201f 0xba80b 0xcb19b 0x6792d 0x10e36b0 0x228efc0 0x228333c 0x228eeaf 0x1068cd 0x4f1a6 0x4dcbf 0x4dbd9 0x4ce34 0x4cc6e 0x4da29 0x50922 0xfafec 0x47bc4 0x47dbf 0x47f55 0x50f67 0x14fcc 0x15fab 0x27315 0x2824b 0x19cf8 0x1beddf9 0x1bedad0 0x1c07bf5 0x1c07962 0x1c38bb6 0x1c37f44 0x1c37e1b 0x157da 0x1765c 0x22cd 0x21f5)
libc++abi.dylib: terminate called throwing an exception
(lldb)
我想我可能已经在Neuburg的书“Programming iOS 4”中找到了答案,在p443的Warning框中。他选择了UITableViewController,因为可能有一个不会将'nil' nib名称与同名控制器相关联的错误。 – zerowords