0

I have completed "Your Second iOS App" only to have the execution fail before the iPhone simulator completes it startup and see signal SIGABRT in Xcode.

At the bottom of the tutorial page there is a listing of all the .h and .m files. There are two peculiar things that I have noticed.

(1) Two files in that listing are never mentioned in the tutorial and there is no storyboard file (but I guess such a file is not reproducible): AddSightingViewController.h AddSightingViewController.m

(2) The two appDelegate files that are automatically created, are not listed, but then they are never mentioned (or used) in the tutorial.

Has anyone successfully run their 2nd tutorial? Can anyone see from the error report below what might be wrong? Notice that the error is "UITableView dataSource must return a cell from 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) 
4

1 回答 1

0

重新启动我的计算机或其他原因导致此错误消息消失。

此外,结果证明,虽然我以为我已经完成了整个教程,但我没有,并且我的评论“(1)该列表中的两个文件在教程中从未提及”是我没有完成教程的信号。还有一页或更多我没有注意到。我现在已经完成了。

我的主要愿望是有一个同样详尽的教程可用,它不使用故事板,而是使用带有 nib 的 Xcode 4.5.2 来完成类似的任务。

所以,我很抱歉有人在这个问题上浪费了时间。

于 2013-01-18T22:13:22.423 回答