HTML5   发布时间:2022-04-27  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了ios – libc abi.dylib:以NSException CollectionView类型的未捕获异常终止大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
当我运行我的应用程序时,我收到此错误

2014-08-11 10:52:10.546 ControlViewTest[918:60b] -[UIViewController collectionView:numberOfItemsInSection:]: unrecognized SELEctor sent to instance 0x8c862f0
2014-08-11 10:52:10.605 ControlViewTest[918:60b] * TerminaTing app due to uncaught exception 'NSInvalidArgumentexception',reason: '-[UIViewController collectionView:numberOfItemsInSection:]: unrecognized SELEctor sent to instance 0x8c862f0'
* First throw call stack:
(
    0   CoreFoundation                      0x017ec1e4 exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x0156b8e5 objc_exception_throw + 44
    2   CoreFoundation                      0x01889243 -[NSObject(NSObject) doesnotRecognizeSELEctor:] + 275
    3   CoreFoundation                      0x017dc50b ___forWARDing_ + 1019
    4   CoreFoundation                      0x017dc0ee _CF_forWARDing_prep_0 + 14
    5   UIKit                               0x008b0c34 -[UICollectionViewData _updateItemCounts] + 331
    6   UIKit                               0x008b0ce1 -[UICollectionViewData _validateItemCounts] + 45
    7   UIKit                               0x008b2c64 -[UICollectionViewData numberOfSections] + 35
    8   UIKit                               0x0087d6ed -[UICollectionView numberOfSections] + 62
    9   UIKit                               0x0089d614 -[UICollectionViewFlowLayout(Internal) _getSizingInfos] + 205
    10  UIKit                               0x0089e48f -[UICollectionViewFlowLayout(Internal) _fetchItemsInfo] + 521
    11  UIKit                               0x00899fe2 -[UICollectionViewFlowLayout prepareLayout] + 157
    12  UIKit                               0x008b0d9d -[UICollectionViewData _prepareToLoadData] + 76
    13  UIKit                               0x008b15c5 -[UICollectionViewData validateLayoutInRect:] + 56
    14  UIKit                               0x00877603 -[UICollectionView layoutSubviews] + 173
    15  UIKit                               0x0029a964 -[UIView(CALayerDelegatE) layoutSublayersOfLayer:] + 355
    16  libobjc.A.dylib                     0x0157d82b -[NSObject performSELEctor:withObject:] + 70
    17  QuartzCore                          0x03c5745a -[CALayer layoutSublayers] + 148
    18  QuartzCore                          0x03c4b244 _ZN2CA5Layer16layout_if_neededEPNS_11transactionE + 380
    19  QuartzCore                          0x03c573a5 -[CALayer layoutIfNeeded] + 160
    20  UIKit                               0x0035cae3 -[UIViewController window:setupWithInterfaceOrientation:] + 304
    21  UIKit                               0x00272aa7 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotaTing:] + 5212
    22  UIKit                               0x00271646 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 82
    23  UIKit                               0x00271518 -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 117
    24  UIKit                               0x002715a0 -[UIWindow _setRotatableViewOrientation:duration:force:] + 67
    25  UIKit                               0x0027063a 57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 120
    26  UIKit                               0x0027059c -[UIWindow _updateToInterfaceOrientation:duration:force:] + 400
    27  UIKit                               0x002712f3 -[UIWindow setAutorotates:forceupdateInterfaceOrientation:] + 870
    28  UIKit                               0x002748e6 -[UIWindow setDelegate:] + 449
    29  UIKit                               0x0034eb77 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 180
    30  UIKit                               0x0026a474 -[UIWindow addRootViewControllerViewIfPossible] + 591
    31  UIKit                               0x0026a5ef -[UIWindow _setHidden:forced:] + 312
    32  UIKit                               0x0026a86b -[UIWindow _orderFrontWithoutMakingKey] + 49
    33  UIKit                               0x002753c8 -[UIWindow makeKeyAndVisible] + 65
    34  UIKit                               0x00225bc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
    35  UIKit                               0x0022a667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
    36  UIKit                               0x0023ef92 -[UIApplication handleEvent:withNewEvent:] + 3517
    37  UIKit                               0x0023f555 -[UIApplication sendEvent:] + 85
    38  UIKit                               0x0022c250 _UIApplicationHandleEvent + 683
    39  Graphicsservices                    0x037e1f02 _PurpleEventCallBACk + 776
    40  Graphicsservices                    0x037e1a0d PurpleEventCallBACk + 46
    41  CoreFoundation                      0x01767ca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_sourcE1_PERFORM_FUNCTION + 53
    42  CoreFoundation                      0x017679db __CFRunLoopDosource1 + 523
    43  CoreFoundation                      0x0179268c __CFRunLoopRun + 2156
    44  CoreFoundation                      0x017919d3 CFRunLoopRunSpecific + 467
    45  CoreFoundation                      0x017917eb CFRunLoopRunInMode + 123
    46  UIKit                               0x00229d9c -[UIApplication _run] + 840
    47  UIKit                               0x0022bf9b UIApplicationMain + 1225
    48  ControlViewTest                     0x0000264d main + 141
    49  libdyld.dylib                       0x01e33701 start + 1
)
libc++abi.dylib: terminaTing with uncaught exception of type NSException
(lldb)@H_502_18@ 
 

有人可以帮我

解决方法

您的UICollectionView有一个数据源集,它没有实现所需的方法 collectionView:numberOfItemsInSection:.您需要为您的UICollectionView分配一个有效的数据源:您编写的类,它实现了collectionView:numberOfItemsInSection:.
@H_502_30@

大佬总结

以上是大佬教程为你收集整理的ios – libc abi.dylib:以NSException CollectionView类型的未捕获异常终止全部内容,希望文章能够帮你解决ios – libc abi.dylib:以NSException CollectionView类型的未捕获异常终止所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。