swift - 单击登录按钮时出现线程错误,该按钮应将视图移动到另一个主视图控制器,但在运行时获取线程
问题描述
未登录
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
解决方案
推荐阅读
- sql - 通过文本数组中的任何值在文本数组中搜索 Postgres sql
- refactoring - 为什么我不能将部分框定义移动到本地绑定中?
- android - 图像和视频的 getItemViewType
- oracle - 我需要为备用或仅安装 oracle 软件安装 oracle 数据库吗?
- python-3.x - 在服务器上的会话结束后查看 Flask App 的终端日志,但应用程序仍在后台运行
- node.js - 如何使用节点读取在 Firestore 中创建的最新文档?
- javascript - TypeScript:如何将类型显式传递给该函数的泛型
- c++ - 迭代 std::pair 的向量时使用结构绑定
* - haskell - 试图理解为什么在 Haskell 中使用 foldr 的这个函数不起作用
- visual-studio-code - VSCode - 如何重新加载所有窗口