{ "id": "119734", "key": "TIMOB-16068", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2013-09-10T04:27:04.000+0000", "priority": null, "labels": [ "ios", "layout", "tableViewRow" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:11.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "When creating a simple tableView row, as shown below, the layout is pretty random. \r\n\r\nh3. Code\r\n\r\n{code}\r\nvar d = ['Account','About'...];\r\n\r\nfor(...) {\r\n\r\n var row = Ti.UI.createTableViewRow({\r\n height: 50,\r\n\r\n hasChild: true,\r\n\r\n leftImage: '/settings/'+d[i]+'.png',\r\n title: d[i],\r\n color: '#333333',\r\n selectedColor: '#2f2f2f',\r\n font: ui.titleFont,\r\n\r\n className: 'settingsRow'\r\n });\r\n\r\n}\r\n\r\ntableView.appendRow(row);\r\nrow=null;\r\n{code}\r\n\r\nWhen the leftImage property is set on the Cell, the UIImage and the UILabel are offset far too off from the left edge. *Ref: 1.png*\r\n\r\nWhen the hasChild property is set to true, the UILabel of the Cell is offset un-naturally. Appears correctly when hasChild is set to false. *Ref: 2.png*", "attachment": [ { "id": "42338", "filename": "1.png", "author": { "name": "dezinezync", "key": "dezinezync", "displayName": "Nikhil N", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-10T04:27:04.000+0000", "size": 50994, "mimeType": "image/png" }, { "id": "42339", "filename": "2.png", "author": { "name": "dezinezync", "key": "dezinezync", "displayName": "Nikhil N", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-10T04:27:04.000+0000", "size": 40894, "mimeType": "image/png" } ], "flagged": false, "summary": "TableViewRow layout and sizes", "creator": { "name": "dezinezync", "key": "dezinezync", "displayName": "Nikhil N", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dezinezync", "key": "dezinezync", "displayName": "Nikhil N", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti SDK 3.1.3.x\r\nXcode 5 B6", "comment": { "comments": [ { "id": "270539", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\n\nI test your code in Ti SDK 3.1.2 and its working pretty good without any issues.\n\nYou can run my following code for testing?\n\n{code}\nvar win = Ti.UI.createWindow({\n\tnavBarHidden : true,\n\texitOnClose : true,\n});\n\nvar tableView = Ti.UI.createTableView({\n\twidth : Ti.UI.FILL,\n\tbackgroundColor : '#fff',\n\theight : Ti.UI.FILL,\n\t \n});\nwin.add(tableView);\n\nvar d = ['Account', 'About', 'milon', 'fdf'];\n\nfor (var i = 0, j = d.length; i < j; i++) {\n\n\tvar row = Ti.UI.createTableViewRow({\n\t\theight : 50,\n\t\thasChild : true,\n\t\tleftImage : '/images/arrow.png',\n\t\ttitle : d[i],\n\t\tcolor : '#333333',\n\t\tselectedColor : '#2f2f2f',\n\t\tclassName : 'settingsRow'\n\t});\n\ttableView.appendRow(row);\n}\n\nwin.open();\n\n{code}\n\nThanks", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2013-09-10T05:52:15.000+0000", "updated": "2013-09-10T05:52:15.000+0000" }, { "id": "270542", "author": { "name": "dezinezync", "key": "dezinezync", "displayName": "Nikhil N", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The issue occurs with Ti 3.1.3.x (issue confirmed with 3.1.3.v20130909184609 as well ~latest)\n\nAs in your case, it works fine with 3.1.2.GA since TableView Cell's layout code was possibly update to suit iOS7's UITableViewCells", "updateAuthor": { "name": "dezinezync", "key": "dezinezync", "displayName": "Nikhil N", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-10T06:25:55.000+0000", "updated": "2013-09-10T06:25:55.000+0000" }, { "id": "270839", "author": { "name": "dezinezync", "key": "dezinezync", "displayName": "Nikhil N", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Same results with XCode 5 GM.", "updateAuthor": { "name": "dezinezync", "key": "dezinezync", "displayName": "Nikhil N", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-12T10:09:06.000+0000", "updated": "2013-09-12T10:09:06.000+0000" }, { "id": "270841", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Tested this issue with the code below and can reproduce with both 3.1.3 and 3.2.0 SDK. \r\n\r\nh5. Testing Environment: \r\n\r\nOS: MAC OS X 10.8.5\r\nTi SDK: 3.1.3 GA, 3.2.0.GA\r\nTi CLI: 3.3.0\r\nIOS Simulator 7.0\r\n\r\n\r\nh5. Test Code \r\n{code:javascript}\r\n \r\n var win = Ti.UI.createWindow({\r\n\tnavBarHidden : true,\r\n\texitOnClose : true,\r\n\ttop : 20,\r\n});\r\n\r\nvar tableView = Ti.UI.createTableView({\r\n\twidth : Ti.UI.FILL,\r\n\tbackgroundColor : '#fff',\r\n\theight : Ti.UI.FILL,\r\n});\r\nwin.add(tableView);\r\n\r\nvar d = ['Account', 'About', 'milon', 'fdf'];\r\n\r\nfor (var i = 0, j = d.length; i < j; i++) {\r\n\r\n\tvar row = Ti.UI.createTableViewRow({\r\n\t\theight : 50, \r\n\t\tleftImage : '/images/arrow.png',\r\n\t\ttitle : d[i],\r\n\t\tcolor : '#333333',\r\n\t\tselectedColor : '#2f2f2f',\r\n\t\tclassName : 'settingsRow'\r\n\t});\r\n\ttableView.appendRow(row);\r\n}\r\n\r\nwin.open();\r\n{code} \r\n\r\nh5. Step to reproduces\r\n# Create a new project\r\n# Paste test code in app.js\r\n# Now run on iOS simulator \r\n# And Simulator screen \r\n \r\n\r\nThanks\r\n", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-12T11:04:23.000+0000", "updated": "2013-12-23T00:14:46.000+0000" }, { "id": "285596", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this issue to engineering as we can reproduce this issue with both 3.1.3 and 3.2.0 SDK. It really does not matter if the hasChild property is set to true or false.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-23T00:15:57.000+0000", "updated": "2013-12-23T00:15:57.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }