TableView insertRowsAtIndexPaths 崩溃

  • *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit/UIKit-3347.44/UITableView.m:1623
    2017-03-02 15:31:17.921 XXX[7299:846749] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (145) must be equal to the number of rows contained in that section before the update (145), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'
    *** First throw call stack:
    (0x183b6c2d8 0x1953900e4 0x183b6c198 0x184a20ed4 0x188792ec8 0x100175a4c 0x100914fd4 0x100914f94 0x100919c28 0x183b237f8 0x183b218a0 0x183a4d2d4 0x18d2636fc 0x188612fac 0x1001d684c 0x195a0ea08)
    libc++abi.dylib: terminating with uncaught exception of type NSException

How to protect tableview from crashing during insertRowsAtIndexPaths and device rotation

  • http://stackoverflow.com/questions/21934181
  • http://www.4byte.cn/question/38988/how-to-protect-tableview-from-crashing-during-insertrowsatindexpaths-and-device-rotation.html

你可能感兴趣的:(TableView insertRowsAtIndexPaths 崩溃)