gpt4 book ai didi

iphone - 自定义单元格崩溃

转载 作者:搜寻专家 更新时间:2023-10-30 20:23:06 24 4
gpt4 key购买 nike

我正在使用 CustomCell tableview,下载数据并绑定(bind)它。当我多次点击时出现此错误。

[NSCFString numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x1bd170
Sat Jan 22 12:03:26 unknown Fridge[535] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x1bd170'
*** Call stack at first throw:
(
0 CoreFoundation 0x314d0987 __exceptionPreprocess + 114
1 libobjc.A.dylib 0x319a149d objc_exception_throw + 24
2 CoreFoundation 0x314d2133 -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x31479aa9 ___forwarding___ + 508
4 CoreFoundation 0x31479860 _CF_forwarding_prep_0 + 48
5 UIKit 0x339023fb -[UITableViewRowData(UITableViewRowDataPrivate) _updateNumSections] + 66
6 UIKit 0x3390235b -[UITableViewRowData invalidateAllSections] + 50
7 UIKit 0x33902111 -[UITableView(_UITableViewPrivate) _updateRowData] + 64
8 UIKit 0x33902069 -[UITableView noteNumberOfRowsChanged] + 64
9 UIKit 0x33901bff -[UITableView reloadData] + 582
10 UIKit 0x33904a0b -[UITableView _reloadDataIfNeeded] + 50
11 UIKit 0x33904e63 -[UITableView layoutSubviews] + 18
12 UIKit 0x338b10cf -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 26
13 CoreFoundation 0x3146ebbf -[NSObject(NSObject) performSelector:withObject:] + 22
14 QuartzCore 0x30a6c685 -[CALayer layoutSublayers] + 120
15 QuartzCore 0x30a6c43d CALayerLayoutIfNeeded + 184
16 QuartzCore 0x30a6656d _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 212
17 QuartzCore 0x30a66383 _ZN2CA11Transaction6commitEv + 190
18 QuartzCore 0x30a89f9d _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 52
19 CoreFoundation 0x31460c59 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 16
20 CoreFoundation 0x31460acd __CFRunLoopDoObservers + 412
21 CoreFoundation 0x314580cb __CFRunLoopRun + 854
22 CoreFoundation 0x31457c87 CFRunLoopRunSpecific + 230
23 CoreFoundation 0x31457b8f CFRunLoopRunInMode + 58
24 GraphicsServices 0x35d664ab GSEventRunModal + 114
25 GraphicsServices 0x35d66557 GSEventRun + 62
26 UIKit 0x338d5329 -[UIApplication _run] + 412
27 UIKit 0x338d2e93 UIApplicationMain + 670
28 Fridge 0x00002a7f main + 70
29 Fridge 0x00002a34 start + 40
)
Sat Jan 22 12:03:26 unknown UIKitApplication:com.sdi.Fridge[0xa6da][535] <Notice>: terminate called after throwing an instance of 'NSException'






**Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CALayer numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x184250'**

谢谢

最佳答案

感谢您对问题的详细了解,但唯一重要的部分是这个

-[NSCFString numberOfSectionsInTableView:]: unrecognized selector 

它告诉您正在调用方法 numberOfSectionsInTableView:NSCFString

这似乎是错误的

所以检查你的代码在哪里调用了那个方法

其余的在您的情况下也不是必需的。

编辑:

您是否在委托(delegate)方法 tableview 中发布了您的自定义单元格。如果是,则改用自动释放。

关于iphone - 自定义单元格崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4766520/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com