编译时我收到以下错误信息:无法识别的选择是在其他类
2011-11-27 14:59:32.049 Storyboard[12104:f803] -[TargetViewController setPeople:]:unrecognized selector sent to instance 0x6d50310
2011-11-27 14:59:32.051 Storyboard[12104:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TargetViewController setPeople:]: unrecognized selector sent to instance 0x6d50310'
*** First throw call stack:
(0x13c5052 0x1556d0a 0x13c6ced 0x132bf00 0x132bce2 0x2877 0x1a9d6 0x1b8a6 0x2a743 0x2b1f8 0x1eaa9 0x12affa9 0x13991c5 0x12fe022 0x12fc90a 0x12fbdb4 0x12fbccb 0x1b2a7 0x1ca9b 0x2508 0x2465)
terminate called throwing an exception
有趣的是,我的TargetViewController甚至没有一个“人”的属性(NSMutableArray的)。
我的应用程序的结构是,我有一个tabView控制器与一个tableView有一个detailView,并在第二个选项卡中有一个普通的视图(targetVieController)与弹出。
(正如你可能会看到我设置了整个事情有一个故事板,也那是我的应用程序的名称。
快速帮助表示赞赏!
编辑
也许我应该补充说,只要应用程序开始加载,编译器就会抛出错误...
正在关注Michaels和MrMusic的建议,我搜索我的人调用堆栈,并得到这个:
_cmd = SEL 0x6eae setPeople:
(我认为这只是一个通知,有断点)
而且,奇怪的是,我有一个包含以“人类的数组“,但它们不会显示在我的tableview中的其他选项卡中。
回溯:
#0 -[TargetViewController setPeople:] (self=0x6891f90, _cmd=0x6e8e, b=0x689a8d0) at /Developer/Projects/Storyboard/Storyboard/TargetViewController.m:73
#1 0x000027c7 in -[CoverdaleAppDelegate application:didFinishLaunchingWithOptions:] (self=0x6a7a650, _cmd=0x4c796a, application=0xad74840, launchOptions=0x0) at /Developer/Projects/Storyboard/Storyboard/CoverdaleAppDelegate.m:44
#2 0x0001a9d6 in -[UIApplication _callInitializationDelegatesForURL:payload:suspended:]()
#3 0x0001b8a6 in -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:]()
#4 0x0002a743 in -[UIApplication handleEvent:withNewEvent:]()
#5 0x0002b1f8 in -[UIApplication sendEvent:]()
#6 0x0001eaa9 in _UIApplicationHandleEvent()
#7 0x012affa9 in PurpleEventCallback()
#8 0x013991c5 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__()
#9 0x012fe022 in __CFRunLoopDoSource1()
#10 0x012fc90a in __CFRunLoopRun()
#11 0x012fbdb4 in CFRunLoopRunSpecific()
#12 0x012fbccb in CFRunLoopRunInMode()
#13 0x0001b2a7 in -[UIApplication _run]()
#14 0x0001ca9b in UIApplicationMain()
#15 0x00002458 in main (argc=1, argv=0xbffff644) at /Developer/Projects/Storyboard/Storyboard/main.m:16
要捕捉谁或什么叫伪造的setter,为什么不在你的'TargetViewController'中临时创建一个'setPeople'方法并在那里设置一个断点? –
已经做了...没有错误。如果我在那里留下了一个空的方法,只是“setPeople”,我没有得到任何警告,但我的数组(“人”),我用来填写我的应用程序代表现在是空的... – Faser
在setPeople中设置断点并查看调用台让我们了解一下谁/试图设置人。 – SundayMonday