Sigabrt与tableview错误(Sigabrt error with tableview)

编程入门 行业动态 更新时间:2024-10-25 14:35:42
Sigabrt与tableview错误(Sigabrt error with tableview)

我最近添加了一个UITableView到我的应用程序,并已收到这些错误。

我在互联网上到处寻找,但我真的希望有人可以帮助我。

DEBUGER-

2016-10-08 02:34:41.404 SharkMate [15408:428153]配置默认应用程序。 2016-10-08 02:34:41.440:FIRInstanceID启用了AppDelegate代理,将swizzle app委托给远程通知处理程序。 要禁用将“FirebaseAppDelegateProxyEnabled”添加到Info.plist并将其设置为NO 2016-10-08 02:34:41.442 SharkMate [15408:] Firebase Analytics v.3402000开始2016-10-08 02:34:41.476 SharkMate [15408 :]启用调试日志记录设置以下应用程序参数:-FIRAnalyticsDebugEnabled 2016-10-08 02:34:41.502 SharkMate [15408:]自动成功创建Firebase Analytics应用程序委托代理。 要禁用代理,请在Info.plist中将标志FirebaseAppDelegateProxyEnabled设置为NO 2016-10-08 02:34:41.551 SharkMate [15408:]启用了Firebase Analytics 2016-10-08 02:34:41.575 SharkMate [15408:428153] *声明失败 - [UITableView _configureCellForDisplay:forIndexPath:],/BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.60.7/UITableView.m:7971 2016-10-08 02:34: 41.579 SharkMate [15408:428153] *由于未捕获异常'NSInternalInconsistencyException',原因:'UITableView(; layer =; contentOffset:{0,-64}; contentSize:{414,308}>)终止应用程序无法获取单元格(0)CoreFoundation 0x000000010f8bcd85 exceptionPreprocess + 165 1 libobjc.A.dylib 0x00000001119f1deb objc_exception_throw + 48 2 CoreFoundation 0x000000010f8bcbea + [NSException raise:format:arguments:] + 106 3 Foundation 0x000000010fd91d5a -从其dataSource() [NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198 4 UIKi 吨0x000000011058f4b1 - [UITableView的_configureCellForDisplay:forIndexPath:] + 225 5的UIKit 0x000000011059b51e - [UITableView的_createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 808 6的UIKit 0x000000011059b62c - [UITableView的_createPreparedCellForGlobalRow:willDisplay:] + 74 7的UIKit 0x000000011056fd4f - [UITableView的_updateVisibleCellsNow:isRecursive: ] + 2996 8 UIKit 0x00000001105a4686 - [UITableView _performWithCachedTraitCollection:] + 92 9 UIKit 0x000000011058b344 - [UITableView layoutSubviews] + 224 10 UIKit 0x00000001104f8980 - [UIView(CALayerDelegate)layoutSublayersOfLayer:] + 703 11 QuartzCore 0x0000000115599c00 - [CALayer layoutSublayers] + 146 12 QuartzCore 0x000000011558e08e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366 13 QuartzCore 0x000000011558df0c _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24 14 QuartzCore 0x00000001155823c9 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277 15 QuartzCore 0x00000001155b0086 _ZN2CA11Transaction6comm ITEV + 486 16 QuartzCore 0x00000001155b07f8 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92 17的CoreFoundation 0x000000010f7e1c37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23 18的CoreFoundation 0x000000010f7e1ba7 __CFRunLoopDoObservers + 391 19的CoreFoundation 0x000000010f7d711c CFRunLoopRunSpecific + 524 20的UIKit 0x0000000110438f21 - [UIApplication的_run] + 402 21的UIKit 0x000000011043df09 UIApplicationMain + 171 22 SharkMate 0x000000010dde9962主+ 114 23 libdyld.dylib 0x00000001124c992d start + 1 24 ??? 0x0000000000000001 0x0 + 1)libc ++ abi.dylib:以NSException类型的未捕获异常终止

I have recently added a UITableView to my app and have receved these errors.

Ive looked everywhere on the internet but am really hoping someone can help me.

DEBUGER-

2016-10-08 02:34:41.404 SharkMate[15408:428153] Configuring the default app. 2016-10-08 02:34:41.440: FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO 2016-10-08 02:34:41.442 SharkMate[15408:] Firebase Analytics v.3402000 started 2016-10-08 02:34:41.476 SharkMate[15408:] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled 2016-10-08 02:34:41.502 SharkMate[15408:] Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist 2016-10-08 02:34:41.551 SharkMate[15408:] Firebase Analytics enabled 2016-10-08 02:34:41.575 SharkMate[15408:428153] * Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.60.7/UITableView.m:7971 2016-10-08 02:34:41.579 SharkMate[15408:428153] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView (; layer = ; contentOffset: {0, -64}; contentSize: {414, 308}>) failed to obtain a cell from its dataSource ()' *** First throw call stack: ( 0 CoreFoundation 0x000000010f8bcd85 exceptionPreprocess + 165 1 libobjc.A.dylib 0x00000001119f1deb objc_exception_throw + 48 2 CoreFoundation 0x000000010f8bcbea +[NSException raise:format:arguments:] + 106 3 Foundation 0x000000010fd91d5a -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198 4 UIKit 0x000000011058f4b1 -[UITableView _configureCellForDisplay:forIndexPath:] + 225 5 UIKit 0x000000011059b51e -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 808 6 UIKit 0x000000011059b62c -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 74 7 UIKit 0x000000011056fd4f -[UITableView _updateVisibleCellsNow:isRecursive:] + 2996 8 UIKit 0x00000001105a4686 -[UITableView _performWithCachedTraitCollection:] + 92 9 UIKit 0x000000011058b344 -[UITableView layoutSubviews] + 224 10 UIKit 0x00000001104f8980 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703 11 QuartzCore 0x0000000115599c00 -[CALayer layoutSublayers] + 146 12 QuartzCore 0x000000011558e08e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366 13 QuartzCore 0x000000011558df0c _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24 14 QuartzCore 0x00000001155823c9 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277 15 QuartzCore 0x00000001155b0086 _ZN2CA11Transaction6commitEv + 486 16 QuartzCore 0x00000001155b07f8 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92 17 CoreFoundation 0x000000010f7e1c37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23 18 CoreFoundation 0x000000010f7e1ba7 __CFRunLoopDoObservers + 391 19 CoreFoundation 0x000000010f7d711c CFRunLoopRunSpecific + 524 20 UIKit 0x0000000110438f21 -[UIApplication _run] + 402 21 UIKit 0x000000011043df09 UIApplicationMain + 171 22 SharkMate 0x000000010dde9962 main + 114 23 libdyld.dylib 0x00000001124c992d start + 1 24 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException

最满意答案

这个错误信号很大程度上给tableview没有注册一个单元格

注册一个单元格到tableview如下

self.tableView.register(UINib.init(nibName: "CustomCellClassName", bundle: Bundle.main), forCellReuseIdentifier:"cell")

确保在笔尖中设置单元标识符

The error signal greatly to tableview not having a cell registered

Register a cell to tableview as below

self.tableView.register(UINib.init(nibName: "CustomCellClassName", bundle: Bundle.main), forCellReuseIdentifier:"cell")

Make sure to set cell identifier in nib

更多推荐

本文发布于:2023-08-04 12:14:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1415633.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   Sigabrt   tableview   error

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!