[TIMOB-2655] Dragging Between TableViewSections in iOS Crashes if new Section has no Rows
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-02-29T15:30:23.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Tim Buckingham |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:26:03.000+0000 |
Updated | 2017-03-20T22:07:00.000+0000 |
Description
Several issues presently exist with dragging between sections in a TableView in iOS (I have not tested this issue in Android).
- Create a UITableView with the "GROUPED" iOS style and give it multiple sections.
- Populate one or more of the sections with rows, leave at least one empty.
- Enable editing mode on the TableView (giving it dragability)
- Drag a row from a populated section to the section that has no rows.
== First Problem ==
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 1. The number of rows contained in an existing section after the update (0) must be equal to the number of rows contained in that section before the update (2), plus or minus the number of rows inserted or deleted from that section (0 inserted, 0 deleted).
This exception is thrown when I have 3 sections, one that has 4 rows and the other two empty. I can drag a row from the top (populated) section down to the middle section and that error is thrown. I can not drag a row to the bottom section.
== Second Problem ==
Terminating app due to uncaught exception 'NSRangeException', reason: ' -[NSMutableArray objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
This exception is thrown when I have any number of sections, populated or not, and drag a row from one section to the BOTTOM of another section. Dragging a row to the top or center or any other row but the bottom results in no errors.
Just for reference: iOS SDK 4.2, Titanium Developer 1.2.2, Titanium SDK 1.5
Closing ticket as duplicate.