{ "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\n

how can i fix this.

\r\n

thanks 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
{html}", "attachment": [ { "id": "29935", "filename": "iOS Simulator Screen shot Jul 20, 2012 2.34.42 PM.png", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-07-20T14:36:18.000+0000", "size": 9704, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: TableView with header and section not working correctly", "creator": { "name": "marcelalburg", "key": "marcelalburg", "displayName": "Marcel Alburg", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "marcelalburg", "key": "marcelalburg", "displayName": "Marcel Alburg", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "128025", "author": { "name": "marcelalburg", "key": "marcelalburg", "displayName": "Marcel Alburg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hello,

\n

we found the problem

\n

In File: ./Classes/TiUITableView.m

\n

In Function: - (CGFloat)tableView:(UITableView *)ourTableView\nheightForHeaderInSection:(NSInteger)section

\n

Ca. Line 1871

\n

if ([tableview tableHeaderView]!=nil && searchField ==\nnil) {

\n
\nsize+=[tableview tableHeaderView].frame.size.height;\n
\n

}

\n

if i commed out the lines, it works.

\n

If this a bug ?
\nThanks

\n

Marcel

{html}", "updateAuthor": { "name": "marcelalburg", "key": "marcelalburg", "displayName": "Marcel Alburg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:15:36.000+0000", "updated": "2011-04-15T03:15:36.000+0000" }, { "id": "128026", "author": { "name": "jamesk", "key": "jamesk", "displayName": "James K", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Unfortunately this fix seems to prevent the section headers in a\nplain table view from 'floating' over the rows as you scroll.

\n

Would be very interested in a solution.

{html}", "updateAuthor": { "name": "jamesk", "key": "jamesk", "displayName": "James K", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:15:36.000+0000", "updated": "2011-04-15T03:15:36.000+0000" }, { "id": "128027", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Possibly fixed, we'll have to see.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:15:37.000+0000", "updated": "2011-04-15T03:15:37.000+0000" }, { "id": "208740", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "See attached screenshot", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-07-20T14:36:33.000+0000", "updated": "2012-07-20T14:36:33.000+0000" }, { "id": "208802", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Does not reproduce with release 2.1.0.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-21T00:04:57.000+0000", "updated": "2012-07-21T00:04:57.000+0000" }, { "id": "410802", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T22:18:11.000+0000", "updated": "2017-03-09T22:18:11.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }