如何防止在tableview中使用大量数据的autolayout崩溃?

时间:2014-03-07 17:02:22

标签: ios objective-c uitableview autolayout

在包含大量数据的tableview中滚动速度非常快时获得此崩溃报告。

NSGenericException Collection< __ NSSetM:0x1688efb0>在被列举时被突变。

tableview在单元格中使用autolayout,通过分析堆栈跟踪,我猜它有问题。有解决方案吗?

通过界面构建​​器添加了约束,并且布局没有问题。界面中没有警告或错误。也许解决方案只是在tableview中使用更少的数据,但我想知道是否有更好的解决方案。

CoreFoundation 0x30c46f4b __exceptionPreprocess + 131
libobjc.A.dylib 0x3b0876af objc_exception_throw + 39    
CoreFoundation 0x30c46a49 -[NSException name] + 1   
Foundation 0x315abb83 -[NSISEngine substituteOutAllOccurencesOfBodyVar:withExpression:] + 439   
Foundation 0x315ae80f -[NSISEngine pivotToMakeBodyVar:newHeadOfRowWithHead:andDropRow:] + 339   
Foundation 0x315ac595 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 237   
Foundation 0x315ac0c7 -[NSISEngine optimize] + 175  
Foundation 0x315b1ccb -[NSISEngine constraintDidChangeSuchThatMarker:shouldBeReplacedByMarkerPlusDelta:] + 307  
Foundation 0x315b1b43 -[NSISEngine tryToChangeConstraintSuchThatMarker:isReplacedByMarkerPlusDelta:undoHandler:] + 423  
Foundation 0x315a73f7 -[NSLayoutConstraint _tryToChangeContainerGeometryWithUndoHandler:] + 467 
Foundation 0x315a6f95 -[NSLayoutConstraint _setSymbolicConstant:constant:] + 381    
UIKit 0x334b2e6b -[UIView(UIConstraintBasedLayout) _autoresizingConstraints_frameDidChange] + 367   
UIKit 0x333b6f1f -[UIView(Geometry) setFrame:] + 671    
UIKit 0x333d871b -[UIScrollView setFrame:] + 131    
UIKit 0x33489a97 -[UITableViewCell setFrame:] + 527 
UIKit 0x334ece65 __53-[UITableView _configureCellForDisplay:forIndexPath:]_block_invoke + 617   
UIKit 0x333cb6e5 +[UIView(Animation) performWithoutAnimation:] + 73 
UIKit 0x334ecbf9 -[UITableView _configureCellForDisplay:forIndexPath:] + 101    
UIKit 0x334eba73 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 435    
UIKit 0x33493de7 -[UITableView _updateVisibleCellsNow:] + 1655  
UIKit 0x33493699 -[UITableView layoutSubviews] + 185    
UIKit 0x333b9da3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 347   
QuartzCore 0x33040c6b -[CALayer layoutSublayers] + 143  
QuartzCore 0x3303c47b _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 351   
QuartzCore 0x3303c30d _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 17    
QuartzCore 0x3303bd1f _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 231   
QuartzCore 0x3303bb2f _ZN2CA11Transaction6commitEv + 315    
QuartzCore 0x33090825 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 517 
IOMobileFramebuffer 0x35cbd76d IOMobileFramebufferVsyncNotifyFunc + 105 
IOKit 0x31928a75 IODispatchCalloutFromCFMessage + 249   
CoreFoundation 0x30c06e21 __CFMachPortPerform + 137
CoreFoundation 0x30c119df __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 35   
CoreFoundation 0x30c1197b __CFRunLoopDoSource1 + 347    
CoreFoundation 0x30c1014f __CFRunLoopRun + 1399 
CoreFoundation 0x30b7ac27 CFRunLoopRunSpecific + 523
CoreFoundation 0x30b7aa0b CFRunLoopRunInMode + 107  
GraphicsServices 0x358a1283 GSEventRunModal + 139   
UIKit 0x3341e049 UIApplicationMain + 1137   
LiveCom 0x000a82c5 main (main.m:16) 
libdyld.dylib 0x3b58fab7 start + 3

0 个答案:

没有答案