Ios 我得到了这个问题;以NSException类型的未捕获异常终止;我被处决了,有人能帮我吗?

Ios 我得到了这个问题;以NSException类型的未捕获异常终止;我被处决了,有人能帮我吗?,ios,xcode,Ios,Xcode,我可以得到以下问题的帮助吗?我在这里被打动了。在执行代码时,我得到了这个日志。我找不到解决办法。我试了一整天,但找不到解决办法 2014-05-29 10:34:35.723 Timesheet[14438:60b] -[UITableViewCell setAlternateRowColor:]: unrecognized selector sent to instance 0x8f98a70 2014-05-29 10:34:35.764 Timesheet[14438:60b] *** T

我可以得到以下问题的帮助吗?我在这里被打动了。在执行代码时,我得到了这个日志。我找不到解决办法。我试了一整天,但找不到解决办法

2014-05-29 10:34:35.723 Timesheet[14438:60b] -[UITableViewCell setAlternateRowColor:]: unrecognized selector sent to instance 0x8f98a70
2014-05-29 10:34:35.764 Timesheet[14438:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableViewCell setAlternateRowColor:]: unrecognized selector sent to instance 0x8f98a70'
*** First throw call stack:
(
    0   CoreFoundation                      0x0180a1e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x015898e5 objc_exception_throw + 44
    2   CoreFoundation                      0x018a7243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
    3   CoreFoundation                      0x017fa50b ___forwarding___ + 1019
    4   CoreFoundation                      0x017fa0ee _CF_forwarding_prep_0 + 14
    5   Timesheet                           0x00002e13 -[ViewController tableView:cellForRowAtIndexPath:] + 691
    6   UIKit                               0x0034211f -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 412
    7   UIKit                               0x003421f3 -[UITableView _createPreparedCellForGlobalRow:] + 69
    8   UIKit                               0x00323ece -[UITableView _updateVisibleCellsNow:] + 2428
    9   UIKit                               0x003386a5 -[UITableView layoutSubviews] + 213
    10  UIKit                               0x002b8964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
    11  libobjc.A.dylib                     0x0159b82b -[NSObject performSelector:withObject:] + 70
    12  QuartzCore                          0x03c7545a -[CALayer layoutSublayers] + 148
    13  QuartzCore                          0x03c69244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
    14  QuartzCore                          0x03c77885 -[CALayer(CALayerPrivate) layoutBelowIfNeeded] + 43
    15  UIKit                               0x002ab026 -[UIView(Hierarchy) layoutBelowIfNeeded] + 595
    16  UIKit                               0x002aadcd -[UIView(Hierarchy) layoutIfNeeded] + 74
    17  UIKit                               0x0038e744 -[UINavigationController _layoutViewController:] + 1062
    18  UIKit                               0x0038d966 -[UINavigationController _layoutTopViewController] + 176
    19  UIKit                               0x0038bb95 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 429
    20  UIKit                               0x0058f74e -[UINavigationTransitionView _notifyDelegateTransitionDidStopWithContext:] + 328
    21  UIKit                               0x0058fa53 -[UINavigationTransitionView _cleanupTransition] + 703
    22  UIKit                               0x0058fa92 -[UINavigationTransitionView _navigationTransitionDidStop] + 55
    23  UIKit                               0x002996dc -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 267
    24  UIKit                               0x00297ec5 +[UIViewAnimationState popAnimationState] + 334
    25  UIKit                               0x002ad123 +[UIView(Animation) commitAnimations] + 36
    26  UIKit                               0x0058f551 -[UINavigationTransitionView transition:fromView:toView:] + 2795
    27  UIKit                               0x0058ea5e -[UINavigationTransitionView transition:toView:] + 55
    28  UIKit                               0x0038f577 -[UINavigationController _startTransition:fromViewController:toViewController:] + 3186
    29  UIKit                               0x0038f8cc -[UINavigationController _startDeferredTransitionIfNeeded:] + 645
    30  UIKit                               0x003904e9 -[UINavigationController __viewWillLayoutSubviews] + 57
    31  UIKit                               0x004d10d1 -[UILayoutContainerView layoutSubviews] + 213
    32  UIKit                               0x002b8964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
    33  libobjc.A.dylib                     0x0159b82b -[NSObject performSelector:withObject:] + 70
    34  QuartzCore                          0x03c7545a -[CALayer layoutSublayers] + 148
    35  QuartzCore                          0x03c69244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
    36  QuartzCore                          0x03c753a5 -[CALayer layoutIfNeeded] + 160
    37  UIKit                               0x0037aae3 -[UIViewController window:setupWithInterfaceOrientation:] + 304
    38  UIKit                               0x00290aa7 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 5212
    39  UIKit                               0x0028f646 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 82
    40  UIKit                               0x0028f518 -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 117
    41  UIKit                               0x0028f5a0 -[UIWindow _setRotatableViewOrientation:duration:force:] + 67
    42  UIKit                               0x0028e63a __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 120
    43  UIKit                               0x0028e59c -[UIWindow _updateToInterfaceOrientation:duration:force:] + 400
    44  UIKit                               0x0028f2f3 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 870
    45  UIKit                               0x002928e6 -[UIWindow setDelegate:] + 449
    46  UIKit                               0x0036cb77 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 180
    47  UIKit                               0x00288474 -[UIWindow addRootViewControllerViewIfPossible] + 591
    48  UIKit                               0x002885ef -[UIWindow _setHidden:forced:] + 312
    49  UIKit                               0x0028886b -[UIWindow _orderFrontWithoutMakingKey] + 49
    50  UIKit                               0x002933c8 -[UIWindow makeKeyAndVisible] + 65
    51  UIKit                               0x00243bc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
    52  UIKit                               0x00248667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
    53  UIKit                               0x0025cf92 -[UIApplication handleEvent:withNewEvent:] + 3517
    54  UIKit                               0x0025d555 -[UIApplication sendEvent:] + 85
    55  UIKit                               0x0024a250 _UIApplicationHandleEvent + 683
    56  GraphicsServices                    0x037fff02 _PurpleEventCallback + 776
    57  GraphicsServices                    0x037ffa0d PurpleEventCallback + 46
    58  CoreFoundation                      0x01785ca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
    59  CoreFoundation                      0x017859db __CFRunLoopDoSource1 + 523
    60  CoreFoundation                      0x017b068c __CFRunLoopRun + 2156
    61  CoreFoundation                      0x017af9d3 CFRunLoopRunSpecific + 467
    62  CoreFoundation                      0x017af7eb CFRunLoopRunInMode + 123
    63  UIKit                               0x00247d9c -[UIApplication _run] + 840
    64  UIKit                               0x00249f9b UIApplicationMain + 1225
    65  Timesheet                           0x0000b60d main + 141
    66  libdyld.dylib                       0x01eeb701 start + 1
    67  ???                                 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 
你有没有研究过:

2014-05-29 10:34:35.723 Timesheet[14438:60b] -[UITableViewCell setAlternateRowColor:] 
?


SetAlternaterRowColor不是UITableViewCell上的有效设置程序。如果看不到代码,很难猜测错误可能是什么,但您使用的单元格不正确。

显示屏幕截图。更容易理解!有这个@raurora:)什么是
setAlternaterRowColor:
?你试过在Xcode中打开异常断点吗?@user3688563-建议你阅读最上面一行。还可以搜索SO/Google以获取有关调试Xcode的帮助。您也可以打开组织者并查看崩溃日志(信息相同,只是更整洁)。感谢您的回复。你能更清楚地告诉我吗?这再清楚不过了。搜索
alternateRowColor
并找出此调用出现的原因。我猜您创建了一个自定义的表视图单元格,但实际上并没有使用它。