{ "id": "91105", "key": "TIMOB-8938", "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": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13402", "description": "Sprint 2012-10 Core", "name": "Sprint 2012-10 Core", "archived": true, "released": true, "releaseDate": "2012-05-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-09T13:10:15.000+0000", "created": "2012-04-30T18:03:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_tableview", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "23450", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "105323", "key": "AC-2499", "fields": { "summary": "iOS: TableView height Ti.UI.SIZE does not take into account HeaderView, FooterView, SectionHeaderView or SectionFooterView", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-12-10T18:08:34.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Setting the height of a tableview to Ti.UI.Size should scale the tableview to it's minimum height. In Titanium 2.0, this feature does not work. The tableview will be scaled to maximum.\r\n\r\nh3. Sample Code 1\r\nTake the kitchensink example, \"tableview_layout_3.js\" and set \"height : Ti.UI.Size\" where tableview variable is declared.\r\n\r\nh3. Sample Code 2\r\n\r\n{noformat}\r\n\r\n/ this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n \r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({\r\n title : 'Tab 1',\r\n backgroundColor : 'red',\r\n layout : 'vertical'\r\n});\r\nvar tab1 = Titanium.UI.createTab({\r\n icon : 'KS_nav_views.png',\r\n title : 'Tab 1',\r\n window : win1\r\n});\r\n \r\nvar label1 = Titanium.UI.createLabel({\r\n width : Ti.UI.SIZE,\r\n height : Ti.UI.SIZE,\r\n color : '#999',\r\n text : 'I am a label on top of the page',\r\n font : {\r\n fontSize : 20,\r\n fontFamily : 'Helvetica Neue'\r\n },\r\n textAlign : 'center',\r\n});\r\nwin1.add(label1);\r\n \r\n// create an array of anonymous objects\r\nvar tbl_data = [{\r\n title : 'Row 1'\r\n}, {\r\n title : 'Row 2'\r\n}, {\r\n title : 'Row 3'\r\n}];\r\n \r\n// now assign that array to the table's data property to add those objects as rows\r\nvar tvTest = Titanium.UI.createTableView({\r\n height : Ti.UI.SIZE,\r\n data : tbl_data,\r\n backgroundColor : '#FFFFFF'\r\n});\r\nwin1.add(tvTest);\r\n \r\nvar label2 = Titanium.UI.createLabel({\r\n width : Ti.UI.SIZE,\r\n height : Ti.UI.SIZE,\r\n color : '#999',\r\n text : 'I am a label underneath the tableview',\r\n font : {\r\n fontSize : 20,\r\n fontFamily : 'Helvetica Neue'\r\n },\r\n textAlign : 'center',\r\n width : 'auto'\r\n});\r\nwin1.add(label2);\r\n \r\n//\r\n// add tab\r\n//\r\ntabGroup.addTab(tab1);\r\n \r\n// open tab group\r\ntabGroup.open();\r\n\r\n{noformat}\r\n\r\nThe tableview in the above code is not visible.\r\n", "attachment": [], "flagged": false, "summary": "iOS: TableView height Ti.UI.SIZE is not working on Titanium 2.0.1GA2 SDK", "creator": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "environment": "Platform OS: iOS \r\nTitanium SDK: 2.0.1 GA2", "comment": { "comments": [ { "id": "193244", "author": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "body": "The rowHeight in the above code was not used that has to be used to create a dynamic table. Using rowHeight fixed the issue.", "updateAuthor": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "created": "2012-04-30T20:25:04.000+0000", "updated": "2012-04-30T20:25:04.000+0000" }, { "id": "194300", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolved by PR https://github.com/appcelerator/titanium_mobile/pull/2153", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-05-09T13:10:15.000+0000", "updated": "2012-05-09T13:10:15.000+0000" }, { "id": "199912", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio build 2.1.0.201206211609\r\nTi Mobile SDK 2.1.0.v20120622174154 hash rdc9dfbe5\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.1\r\n\r\nVerified expected behavior is shown", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-23T13:15:24.000+0000", "updated": "2012-06-23T13:15:24.000+0000" }, { "id": "219317", "author": { "name": "youngtt", "key": "youngtt", "displayName": "Young", "active": true, "timeZone": "America/Los_Angeles" }, "body": "TableView height calculations are still INACCURATE when any of these are used in the TableView: HeaderView, FooterView, SectionHeaderView, SectionFooterView.\r\n\r\nPlease re-confirm behavior.", "updateAuthor": { "name": "youngtt", "key": "youngtt", "displayName": "Young", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-17T12:28:08.000+0000", "updated": "2012-09-17T12:28:08.000+0000" }, { "id": "228147", "author": { "name": "davidyang", "key": "davidyang", "displayName": "David Yang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I can confirm that Young is correct. Ti.UI.SIZE doesn't work if you have HeaderViews.", "updateAuthor": { "name": "davidyang", "key": "davidyang", "displayName": "David Yang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-21T06:45:54.000+0000", "updated": "2012-11-21T06:45:54.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }