首页 > 解决方案 > 单击登录按钮时出现线程错误,该按钮应将视图移动到另一个主视图控制器,但在运行时获取线程

问题描述

未登录

2021-03-21 08:05:13.707070-0700 CarSaleAgent[28101:221025] pushViewController:animated: called on <UINavigationController 0x7fa3ba046800> while an existing transition or presentation is occurring; the navigation stack will not be updated.
Ok
2021-03-21 08:05:19.099331-0700 CarSaleAgent[28101:221025] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/apple/Library/Developer/CoreSimulator/Devices/B81E5794-CC42-4D72-AEC2-9402A99389A8/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2021-03-21 08:05:19.101287-0700 CarSaleAgent[28101:221025] [MC] Reading from private effective user settings.
Login Successfull
2021-03-21 08:05:30.885064-0700 CarSaleAgent[28101:221025] *** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3698.84.15/UICollectionView.m:5372
2021-03-21 08:05:30.902325-0700 CarSaleAgent[28101:221025] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'could not dequeue a view of kind: UICollectionElementKindCell with identifier homeCollectionViewCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010b46129b __exceptionPreprocess + 331
    1   libobjc.A.dylib                     0x000000010a9fd735 objc_exception_throw + 48
    2   CoreFoundation                      0x000000010b461022 +[NSException raise:format:arguments:] + 98
    3   Foundation                          0x000000010a401b47 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
    4   UIKitCore                           0x00000001105bad1e -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:] + 2536
    5   UIKitCore                           0x00000001105bafa9 -[UICollectionView dequeueReusableCellWithReuseIdentifier:forIndexPath:] + 169
    6   CarSaleAgent                        0x000000010a0a4d99 $S12CarSaleAgent18HomeViewControllerC010collectionE0_13cellForItemAtSo012UICollectionE4CellCSo0lE0C_10Foundation9IndexPathVtF + 345
    7   CarSaleAgent                        0x000000010a0a501c $S12CarSaleAgent18HomeViewControllerC010collectionE0_13cellForItemAtSo012UICollectionE4CellCSo0lE0C_10Foundation9IndexPathVtFTo + 108
    8   UIKitCore                           0x00000001105a48f0 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:] + 314
    9   UIKitCore                           0x00000001105a47b0 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:] + 31
    10  UIKitCore                           0x00000001105a9e67 -[UICollectionView _updateVisibleCellsNow:] + 6164
    11  UIKitCore                           0x00000001105af68e -[UICollectionView layoutSubviews] + 364
    12  UIKitCore                           0x0000000110c16015 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1441
    13  QuartzCore                          0x000000011253ad3d -[CALayer layoutSublayers] + 175
    14  QuartzCore                          0x000000011253fbf7 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395
    15  QuartzCore                          0x00000001124b8aa6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 342
    16  QuartzCore                          0x00000001124efc2a _ZN2CA11Transaction6commitEv + 576
    17  UIKitCore                           0x00000001104f6ff9 _UIApplicationFlushRunLoopCATransactionIfTooLate + 165
    18  UIKitCore                           0x0000000110454090 __handleEventQueueInternal + 6874
    19  CoreFoundation                      0x000000010b3c4b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    20  CoreFoundation                      0x000000010b3c43a3 __CFRunLoopDoSources0 + 243
    21  CoreFoundation                      0x000000010b3bea4f __CFRunLoopRun + 1263
    22  CoreFoundation                      0x000000010b3be221 CFRunLoopRunSpecific + 625
    23  GraphicsServices                    0x00000001146b91dd GSEventRunModal + 62
    24  UIKitCore                           0x00000001104fd115 UIApplicationMain + 140
    25  CarSaleAgent                        0x000000010a0b36d7 main + 71
    26  libdyld.dylib                       0x000000010e158551 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

标签: swiftuicollectionviewcellviewcontroller

解决方案


推荐阅读