由于未捕获的异常NSInvalidArgumentException[UIView子类\u需要设置]而终止应用程序

由于未捕获的异常NSInvalidArgumentException[UIView子类\u需要设置]而终止应用程序,exception,tvos,unrecognized-selector,Exception,Tvos,Unrecognized Selector,有没有关于如何调试的建议?我已经尝试设置一个异常断点,但没有帮助 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView subclass _needsSetup]: unrecognized selector sent to instance 0x7fdd73366be0' ( 0 CoreFoundation 0x

有没有关于如何调试的建议?我已经尝试设置一个异常断点,但没有帮助

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView subclass _needsSetup]: unrecognized selector sent to instance 0x7fdd73366be0'

(
0   CoreFoundation                      0x00000001106baff5 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x0000000110031deb objc_exception_throw + 48
2   CoreFoundation                      0x00000001106c361d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3   CoreFoundation                      0x0000000110610a9a ___forwarding___ + 970
4   CoreFoundation                      0x0000000110610648 _CF_forwarding_prep_0 + 120
5   UIKit                               0x000000010ded0526 -[UITableView _configureCellForDisplay:forIndexPath:] + 298
6   UIKit                               0x000000010deb91a0 -[UITableView _updateAnimationDidStop:finished:context:] + 2484
7   UIKit                               0x000000010deb8791 __46-[UITableView _updateWithItems:updateSupport:]_block_invoke1187 + 82
8   Foundation                          0x000000010fc1acd9 __NSFireDelayedPerform + 402
9   CoreFoundation                      0x000000011061ae14 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
10  CoreFoundation                      0x000000011061a9c1 __CFRunLoopDoTimer + 1089
11  CoreFoundation                      0x00000001105dc3d1 __CFRunLoopRun + 1937
12  CoreFoundation                      0x00000001105db9b8 CFRunLoopRunSpecific + 488
13  GraphicsServices                    0x0000000112748ad2 GSEventRunModal + 161
14  UIKit                               0x000000010dd838fc UIApplicationMain + 171
15  Power-tvOS                          0x000000010d70170d main + 109
16  libdyld.dylib                       0x00000001123aa9e9 start + 1
17  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib:以NSException类型的未捕获异常终止

您可能正在从
cellForRowAtIndexPath:
方法返回一个非单元格。@但未返回任何单元格。我有一个自定义视图作为UITableView.tableHeaderView。只有在从自定义视图中选择按钮后刷新tableView时,才会发生此异常。如果我从tableView.tableHeaderView中删除自定义视图,我不会收到异常。@dan这是特定于tvOS 9.1的,它在tvOS 9.0中工作