1. 程式人生 > >UITableViewCell的操作(增加cell,刪除cell,插入cell)

UITableViewCell的操作(增加cell,刪除cell,插入cell)

插入一個cell。也可插入多個

*** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.60.7/UITableView.m:1716

reason: 'Invalid update: invalid number of rows in section 0.  The number of rows contained in an existing section after the update (5) must be equal to the number of rows contained in that section before the update (5), 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).'

也可以解決這個bug

替換

刪除一個cell,也可以刪除多個