Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15593] iOS: A Label in a TableViewRow shifts up and down when text is updated

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-29T18:14:38.000+0000
Affected Version/sRelease 3.1.3
Fix Version/sRelease 3.2.0
ComponentsiOS
LabelsSupportTeam, module_tableviewrow, qe-manualtest, triage
ReporterMostafizur Rahman
AssigneeVishal Duggal
Created2013-10-27T15:22:24.000+0000
Updated2014-08-14T06:41:17.000+0000

Description

Problem Description

Label in the TableViewRow is moving up and down (Approx. 1-2px) after every text update. If I set top attribute value on the label then working well but sometimes (On real device very often) blink after text update.

My testing environment follows:

OS: MAC OX X 10.8.5 Ti SDK: 3.1.3 GA Ti CLI: 3.2.0 IOS simulator 7.0

My test code

var win = Ti.UI.createWindow(),
	table = Ti.UI.createTableView();

var rowWithLabel = Ti.UI.createTableViewRow({
	width: Ti.UI.FILL, height: Ti.UI.FILL
});

var label = Ti.UI.createLabel({
	//top: 10
});

rowWithLabel.add(label);
table.data = [Ti.UI.createTableViewRow(), rowWithLabel, Ti.UI.createTableViewRow()];

win.add(table);
win.open();



setInterval(function(){
	var date = new Date(),
    	h = ("0" + date.getHours()).slice(-2),
    	m = ("0" + date.getMinutes()).slice(-2),
        s = ("0" + date.getSeconds()).slice(-2);

	label.text = h + ":" + m + ":" + s;
}, 1000);

Step to reproduces

1. Create a new project 2. Paste test code in app.js 3. Now run on iOS 7 with simulator 7.0 4. See simulator screen, its moving up and down

Expected result

It should fixed/ not moving up and down. Thanks

Comments

  1. Matej 2013-10-28

    *4. See simulator screen, its moving up and down* -> Only label is moving up and down. *It should fixed/ not moving up and down.* If is used "top" property in the label then the label is not moving ,but blinking after text update. Thank you
  2. Vishal Duggal 2013-10-29

    Fixed along with fixes for TIMOB-14888
  3. Pragya Rastogi 2013-11-12

    Tested and Verified Fix with: OSX: 10.8.5 Xcode:5.0 Appcelerator Studio: 3.2.0.201311112306 SDK: 3.2.0.v20131111174605 acs:1.0.7 alloy:1.3.0 npm:1.3.2 titanium:3.2.0 titanium-code-processo:1.0.3 Device: iOS7(v7.0.3)-iPodTouch1 Simulator- iPhone Retina(4-inch) iOS 7.0

JSON Source