{ "id": "62077", "key": "TIMOB-1445", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-06-22T14:37:51.000+0000", "created": "2011-04-15T02:53:02.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "defect", "header", "ios", "iphone", "view" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T22:49:40.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}

A customer reported that when updating the text of a label in a\nheader view, the headerView moves, jumping to the middle of the\nwindow. I have reproduced this as well in iOS 4 and sdk 1.4

\n

FWIW, if the label is given a height of 35 it doesn't jump\naround

\n

CODE:

\n

var win = Ti.UI.createWindow({});

\n

var data = [];

\n

data[0] = Ti.UI.createTableViewRow({title:'Row 1'});
\ndata[1] = Ti.UI.createTableViewRow({title:'Row 2'});
\ndata[2] = Ti.UI.createTableViewRow({title:'Row 3'});
\ndata[3] = Ti.UI.createTableViewRow({title:'Row 4'});

\n

var headerView = Ti.UI.createView({height:'auto'});

\n

var headerLabel = Ti.UI.createLabel({

\n
\ntext:'Here is some text for the header label.',\nheight:'auto',\nleft:10,\nright:10\n
\n

});

\n

headerView.add(headerLabel);

\n

var tableView = Ti.UI.createTableView({

\n
\nstyle:Titanium.UI.iPhone.TableViewStyle.GROUPED,\ntop:0,\nright:0,\nleft:0,\nheaderView:headerView,\ndata:data\n
\n

});

\n

win.add(tableView);

\n

var button = Ti.UI.createButton({

\n
\ntitle:'Change Header',\nheight:40,\nwidth:150,\nbottom:10\n
\n

});

\n

button.addEventListener('click', function()
\n{

\n
\nheaderLabel.text = 'This is some different text.';\n
\n

});

\n

win.add(button);

\n

win.open();

{html}", "attachment": [], "flagged": false, "summary": "Updating a label in a table header view causes a layout issue", "creator": { "name": "ctredway1", "key": "ctredway1", "displayName": "ctredway", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ctredway1", "key": "ctredway1", "displayName": "ctredway", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "125726", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Note to self: This may be due to any change in header's height\nrequiring a reload of the section, but still possible to compensate\naround this.

{html}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:53:03.000+0000", "updated": "2011-04-15T02:53:03.000+0000" }, { "id": "125727", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Was this fixed in the refactor? We'll have to revisit it.

{html}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:53:03.000+0000", "updated": "2011-04-15T02:53:03.000+0000" }, { "id": "199817", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of TIMOB-8503", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-22T14:37:51.000+0000", "updated": "2012-06-22T14:37:51.000+0000" }, { "id": "410847", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T22:49:40.000+0000", "updated": "2017-03-09T22:49:40.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }