{ "id": "90712", "key": "AC-3014", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-06-01T08:17:57.000+0000", "created": "2012-04-20T18:29:37.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:48:02.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": "I was stuck on this weird behavior today where my table view would not show the iOS pinstrip background behind my tableview on the 2nd and most after that views. It always showed on the first.\r\n\r\nHere was my code:\r\n\r\n{code:JavaScript}\r\nvar tableview = Titanium.UI.createTableView({\r\n\tdata: data\r\n});\r\n\r\nif (isApple())\r\n{\r\n\ttableview.style = Titanium.UI.iPhone.TableViewStyle.GROUPED;\r\n}\r\n{code}\r\n\r\nThrough trial and error I found out that this worked properly:\r\n\r\n{code:JavaScript}\r\nif (isApple())\r\n{\r\n\tvar tableview = Titanium.UI.createTableView({\r\n\t\tdata: data\r\n\t\tstyle: Titanium.UI.iPhone.TableViewStyle.GROUPED;\r\n\t});\r\n}\r\nelse\r\n{\r\n\tvar tableview = Titanium.UI.createTableView({\r\n\t\tdata: data\r\n\t});\t\r\n}\r\n{code}\r\n\r\nSo why does it matter if I set the property in the create or after?", "attachment": [], "flagged": false, "summary": "CreateTableView Style", "creator": { "name": "brandonfuller", "key": "brandonfuller", "displayName": "Brandon Fuller", "active": true, "timeZone": "America/Denver" }, "subtasks": [], "reporter": { "name": "brandonfuller", "key": "brandonfuller", "displayName": "Brandon Fuller", "active": true, "timeZone": "America/Denver" }, "environment": "SDK 2.0.1", "comment": { "comments": [ { "id": "193234", "author": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can you provide the SDK version?\r\n", "updateAuthor": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-30T17:18:45.000+0000", "updated": "2012-04-30T17:18:45.000+0000" }, { "id": "193243", "author": { "name": "brandonfuller", "key": "brandonfuller", "displayName": "Brandon Fuller", "active": true, "timeZone": "America/Denver" }, "body": "2.0.1.GA2", "updateAuthor": { "name": "brandonfuller", "key": "brandonfuller", "displayName": "Brandon Fuller", "active": true, "timeZone": "America/Denver" }, "created": "2012-04-30T19:35:34.000+0000", "updated": "2012-04-30T19:35:34.000+0000" }, { "id": "194304", "author": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "body": "See this sample it works:\r\n{code}var win = Ti.UI.createWindow({\r\n backgroundColor: 'white',\r\n \r\n title: 'TableView Demo'\r\n});\r\n\r\nvar data = [];\r\n\r\nfor (var c=0;c<4;c++)\r\n{\r\n\tdata[c] = Ti.UI.createTableViewSection({headerTitle:'Group '+(c+1)});\r\n\tfor (var x=0;x<10;x++)\r\n\t{\r\n\t\tdata[c].add(Ti.UI.createTableViewRow({title:'Group '+(c+1)+', Row '+(x+1)}));\r\n\t}\r\n}\r\n\r\n// create table view\r\nvar tableview = Titanium.UI.createTableView({\r\n\tdata:data,\r\n\t\r\n});\r\n\r\ntableview.style = Titanium.UI.iPhone.TableViewStyle.PLAIN;\r\n\r\n\r\nwin.add(tableview);\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-09T13:38:37.000+0000", "updated": "2012-05-09T13:38:37.000+0000" }, { "id": "196841", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Setting _style_ worked both ways (at instantiation or through property).\r\n{code}\r\n// create table view\r\nvar tableview = Titanium.UI.createTableView({\r\n data:data,\r\n style : Titanium.UI.iPhone.TableViewStyle.GROUPED\r\n});\r\n \r\n//tableview.style = Titanium.UI.iPhone.TableViewStyle.GROUPED;\r\n{code}\r\n\r\nh6.Tested on\r\nTitanium SDK 2.0.1.GA2\r\niOS 5 Simulator", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-01T08:17:19.000+0000", "updated": "2012-06-01T08:17:19.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }