{ "id": "62914", "key": "TIMOB-2282", "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": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-07-20T14:36:33.000+0000", "created": "2011-04-15T03:15:35.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [], "versions": [ { "id": "11233", "name": "Release 1.6.0", "archived": true, "released": true, "releaseDate": "2011-02-23" } ], "issuelinks": [ { "id": "19059", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94532", "key": "TIMOB-9901", "fields": { "summary": "TiAPI: Review and clean up platform bugs and reduce bug count by 20%.", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T22:18:11.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": "{html}
If i use a TableView with a header and a section. The section\r\nhas the same height like the TableView header.
\r\nhow can i fix this.
\r\nthanks Marcel
\r\n\r\n\r\nvar win1 = Titanium.UI.createWindow({\r\n title: 'Tab 1',\r\n backgroundColor: '#fff'\r\n});\r\n \r\nvar data = [];\r\n \r\nvar hv = Titanium.UI.createView({\r\n backgroundColor: '#c3c3c3',\r\n height: 'auto'\r\n});\r\n \r\n \r\n \r\n \r\nvar hlv = Titanium.UI.createLabel({\r\n text: 'Views',\r\n left: 80,\r\n font: {\r\n fontSize: 14\r\n },\r\n height: 40\r\n});\r\nhv.add(hlv);\r\n \r\nvar section = Titanium.UI.createTableViewSection({\r\n height: 40,\r\n headerView: hv\r\n});\r\n \r\ndata.push(section);\r\n \r\n \r\n \r\ndata.push({\r\n title: \"Row 1\"\r\n});\r\n \r\ndata.push({\r\n title: \"Row 2\"\r\n});\r\n \r\n \r\nvar view4 = Ti.UI.createView({\r\n backgroundColor: 'black'\r\n});\r\nvar l4 = Ti.UI.createLabel({\r\n text: 'View 4',\r\n color: '#fff',\r\n width: 'auto',\r\n height: 'auto'\r\n});\r\nview4.add(l4);\r\n \r\nvar view3 = Ti.UI.createView({\r\n backgroundColor: 'black'\r\n});\r\nvar l3 = Ti.UI.createLabel({\r\n text: 'View 3',\r\n color: '#fff',\r\n width: 'auto',\r\n height: 'auto'\r\n});\r\nview3.add(l3);\r\n \r\nvar scrollView = Titanium.UI.createScrollableView({\r\n views: [view3, view4],\r\n showPagingControl: true,\r\n pagingControlHeight: 30,\r\n maxZoomScale: 2.0,\r\n currentPage: 1,\r\n height: 150,\r\n top: 0\r\n});\r\n \r\n \r\n \r\n \r\nvar table = Titanium.UI.createTableView({\r\n headerView: scrollView,\r\n data: data,\r\n});\r\nwin1.add(table);
\r\n
Hello,
\nwe found the problem
\nIn File: ./Classes/TiUITableView.m
\nIn Function: - (CGFloat)tableView:(UITableView *)ourTableView\nheightForHeaderInSection:(NSInteger)section
\nCa. Line 1871
\nif ([tableview tableHeaderView]!=nil && searchField ==\nnil) {
\n\nsize+=[tableview tableHeaderView].frame.size.height;
\n
\n}
\nif i commed out the lines, it works.
\nIf this a bug ?
\nThanks
Marcel
Unfortunately this fix seems to prevent the section headers in a\nplain table view from 'floating' over the rows as you scroll.
\nWould be very interested in a solution.
Possibly fixed, we'll have to see.