title: How do I prevent crash from using autolayout in tableview with a lot of data?
body: <p>Got this crash report while scrolling really fast in a tableview with a lot of data. </p>
  
  <p><strong>NSGenericException Collection &lt;__NSSetM: 0x1688efb0> was mutated while being enumerated.</strong></p>
  
  <p>The tableview uses autolayout in the cells, and by analysing the stack trace I guess that something is wrong with it. Is there a solution to this?</p>
  
  <p>The constraints were added via interface builder and there are no issues with the layout. No warnings or errors in the interface. Maybe the solution would be just to use less data in the tableview, but I want to know if there's a better solution.</p>
  
  <pre><code>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
  </code></pre>