tableview - 发送到实例的无法识别的选择器
问题描述:
我刚刚在我的应用程序中出现此错误。tableview - 发送到实例的无法识别的选择器
2010-04-06 03:58:55.505 EasyPay DPS[6530:207] *** -[NTItems tableView]:
unrecognized selector sent to instance 0x397af90
2010-04-06 03:58:55.515 EasyPay DPS[6530:207] ***
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'*** -[NTItems tableView]: unrecognized selector sent to instance 0x397af90'
这个错误是非常无用的 - 我在哪里开始我的代码?
这里的堆栈:
2010-04-06 03:58:55.522 EasyPay DPS[6530:207] Stack: (
29283419,
2541614345,
29665339,
29234806,
29087426,
14309,
3233602,
3226942,
3269216,
3265242,
3271699,
3252934,
3274087,
3252583,
12030,
3029574,
3012740,
266666,
29067968,
29064264,
37373461,
37373658,
2756527,
9456,
9310
)
#0 0x01c20004 in ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___()
#1 0x977df509 in objc_exception_throw()
#2 0x01c4a83b in -[NSObject doesNotRecognizeSelector:]()
#3 0x01be1676 in ___forwarding___()
#4 0x01bbd6c2 in __forwarding_prep_0___()
#5 0x00003809 in -[NTItems viewDidLoad] (self=0x3965490, _cmd=0x15ee1bc) at /Users/shamilnunhuck/Documents/EasyPay DPS/Classes/NTItems.m:38
#6 0x00315742 in -[UIViewController view]()
#7 0x00313d3e in -[UIViewController contentScrollView]()
#8 0x0031e260 in -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:]()
#9 0x0031d2da in -[UINavigationController _layoutViewController:]()
#10 0x0031ec13 in -[UINavigationController _startTransition:fromViewController:toViewController:]()
#11 0x0031a2c6 in -[UINavigationController _startDeferredTransitionIfNeeded]()
#12 0x0031f567 in -[UINavigationController pushViewController:transition:forceImmediate:]()
#13 0x0031a167 in -[UINavigationController pushViewController:animated:]()
#14 0x00002f22 in -[RootViewController tableView:didSelectRowAtIndexPath:] (self=0x391f1d0, _cmd=0x15e67b4, tableView=0x4071c00, indexPath=0x3977540 at /Users/shamilnunhuck/Documents/EasyPay DPS/Classes/RootViewController.m:167
#15 0x002e3a46 in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:]()
#16 0x002df884 in -[UITableView _userSelectRowAtIndexPath:]()
#17 0x000411aa in __NSFireDelayedPerform()
#18 0x01bb8ac0 in CFRunLoopRunSpecific()
#19 0x01bb7c48 in CFRunLoopRunInMode()
#20 0x023a4615 in GSEventRunModal()
#21 0x023a46da in GSEventRun()
#22 0x002a0faf in UIApplicationMain()
#23 0x00002514 in main (argc=1, argv=0xbfffefb8) at /Users/shamilnunhuck/Documents/EasyPay DPS/main.m:14
答
你的问题是viewDidLoad
在线38
仔细检查方法名,接收器名称等
+0
由于某种原因,我添加了另一个UISearchBar。谢谢:) – bear 2010-04-06 03:39:33
+0
不客气。 – 2010-04-06 03:40:42
答
尝试添加的tableView属性或方法调用之前调用NTItems,或者从UITableViewController派生,以便为您定义该方法。
如果您正在调试器中运行,请在控制台中键入bt以进行堆栈跟踪。 – 2010-04-06 03:20:52
添加堆栈跟踪 – bear 2010-04-06 03:29:47