nghialv / Hakuba

:cherry_blossom: Cellmodel-driven tableview manager
MIT License
474 stars 40 forks source link

Error when deleting row #27

Closed remirobert closed 8 years ago

remirobert commented 8 years ago

Hello, I am trying to delete a row. But I got this crash :

Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (1) must be equal to the number of rows contained in that section before the update (1), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).

This is how I am trying to delete my row :

self.models.value.removeFirst()
self.hakuba[0].remove(0).slide(MYAnimation.Left)
nghialv commented 8 years ago

Thanks for your reporting. I will check it.

remirobert commented 8 years ago

Thank you ! :+1:

remirobert commented 8 years ago

I even try in the example project, in case my implementation was wrong, but it crashes also.

nghialv commented 8 years ago

I have just released Hakuba with version 2.0. I think this problem has been fixed in this version. So please try it.

remirobert commented 8 years ago

Working now. Thanks ! But the migration to the version 2.0, was a real pain. Anyway good job :+1: