{ "id": "131172", "key": "AC-1137", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2014-07-14T22:32:08.000+0000", "created": "2014-06-03T10:54:48.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:37:30.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "After table view section is added dynamically (for example, after table view click), deleting table view row does not work.\r\n\r\n\r\nTo see this issue, run this code:\r\n\r\n{code}\r\nTi.UI.setBackgroundColor(\"#fff\")\r\n\r\nvar win = Ti.UI.createWindow({\r\n\ttop: 20,\r\n\tbackgroundColor: \"#ccc\"\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n\ttop: 0,\r\n\tbottom: 0\r\n});\r\n\r\nvar section = Ti.UI.createTableViewSection({\r\n\theaderView: Ti.UI.createLabel({ text: \"Section\" })\r\n});\r\n\r\nfor (var i = 0; i < 10; i++) {\r\n\tsection.add(Ti.UI.createTableViewRow({\r\n\t\ttitle: \"Row \" + (i + 1)\r\n\t}));\r\n}\r\n\r\ntable.setData([ section ]);\r\n\r\nvar newSection;\r\ntable.addEventListener(\"click\", function(e) {\r\n\r\n\tif (!newSection) {\r\n\t\tnewSection = Ti.UI.createTableViewSection({\r\n\t\t\theaderView: Ti.UI.createLabel({ text: \"Section 0\" })\r\n\t\t});\r\n\r\n\t\tnewSection.add(Ti.UI.createTableViewRow({\r\n\t\t\ttitle: \"Bleh\"\r\n\t\t}));\r\n\r\n\t\ttable.insertSectionBefore(0, newSection);\r\n\t}\r\n\telse {\r\n\t\tvar index = e.index, row;\r\n\r\n\t\tif (e.index < table.data[1].rows.length) {\r\n\t\t\trow = table.data[1].rows[e.index];\r\n\t\t}\r\n\r\n\t\tTi.API.info('row');\r\n\t\tTi.API.info(row && row.title);\r\n\r\n\t\tif (row) {\r\n\t\t\ttable.deleteRow(row);\r\n\t\t}\r\n\r\n\t}\r\n\r\n});\r\n\r\nwin.add(table);\r\n\r\nwin.open();\r\n{code}\r\n\r\nClick first time on some row in \"Section\" to add new section at beginning. After that, click on other rows, you'll see nothing happens. \r\nCheck logs, this is error message: Assertion failure in -[UITableView _endCellAnimationsWithContext:]", "attachment": [], "flagged": false, "summary": "iOS: Can't delete row after dynamically adding section to table view", "creator": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "* TiSDK 3.3.0.Beta, 3.2.3.GA\r\n* iOS 7.1\r\n* Ti CLI 3.3.0-beta\r\n* OSX 10.9.2\r\n* XCode 5.1", "comment": { "comments": [ { "id": "308206", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-06-10T06:18:16.000+0000", "updated": "2014-06-10T06:18:16.000+0000" }, { "id": "313978", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "DUP of TIMOB-17097", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-14T22:32:08.000+0000", "updated": "2014-07-14T22:32:08.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }