{ "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
\nFWIW, if the label is given a height of 35 it doesn't jump\naround
\nCODE:
\nvar win = Ti.UI.createWindow({});
var data = [];
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'});
var headerView = Ti.UI.createView({height:'auto'});
var headerLabel = Ti.UI.createLabel({
\ntext:'Here is some text for the header label.',\nheight:'auto',\nleft:10,\nright:10
\n
\n});
\nheaderView.add(headerLabel);
var tableView = Ti.UI.createTableView({
\nstyle:Titanium.UI.iPhone.TableViewStyle.GROUPED,\ntop:0,\nright:0,\nleft:0,\nheaderView:headerView,\ndata:data
\n
\n});
\nwin.add(tableView);
var button = Ti.UI.createButton({
\ntitle:'Change Header',\nheight:40,\nwidth:150,\nbottom:10
\n
\n});
\nbutton.addEventListener('click', function()
\n{
\nheaderLabel.text = 'This is some different text.';
\n
\n});
\nwin.add(button);
win.open();
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.
Was this fixed in the refactor? We'll have to revisit it.