App crush: Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘Invalid update: invalid number of rows in section 0

You mentioned invalid no of rows in section 0 :
In insertRowMode3 , you are inserting rows but not updating the table view.
So your table view getting the same count of no of rows in table view even afer updating, thats where inconsistency is.

Use tableview.beginUpdates() ,
then insert rows ,
increment ur rows value ,
then tableview.endUpdates()

Let me know if it doesn’t help you out.

Leave a Comment