Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15202] iOS7: Label text partially hiding so height has to be increased one point

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-29T17:40:12.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 22, 2013 Sprint 22 API, Release 3.2.0
ComponentsiOS
Labelsmodule_label, qe-testadded, supportTeam
ReporterEduardo Gomez
AssigneeVishal Duggal
Created2013-09-16T18:26:48.000+0000
Updated2014-02-21T10:55:15.000+0000

Description

Issue description

In iOS 7 label text is partially hiding (16dp). Same label looks good in iOS 6. If you changed the height of the label (increased one point), it looks good in iOS 7. Attached are screenshots (iOS 6 & iOS7) for wider info.

Code to reproduce

// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
 
var win = Titanium.UI.createWindow({
  backgroundColor : '#fff',
  layout : 'vertical'
});
 
var label1 = Titanium.UI.createLabel({
	top:'30dp',
	color : '#000',
	width : '30%',
	height : '17dp',//17dp will work fine in iOS7 
	text : 'I am Window 1 and it is long text',
	backgroundColor : '#ccc',
	font : {
		fontSize : 14,
		fontFamily : 'Helvetica Neue'
	},
	textAlign : 'left'
});
win.add(label1);
 
var label2 = Titanium.UI.createLabel({
	top:'30dp',
	color : '#000',
	width : '40%',
	height : '16dp',//16dp will fail in iOS7 
	text : 'I am Window 1 and it is long text',
	backgroundColor : 'yellow',
	font : {
		fontSize : 14,
		fontFamily : 'Helvetica Neue'
	},
	textAlign : 'left'
});
win.add(label2);
 
win.open();

Attachments

FileDateSize
00000103.png2013-09-16T18:26:48.000+0000134138

Comments

  1. Vincent 2013-09-17

    relates to TIMOB-15086
  2. Vishal Duggal 2013-10-28

    Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4868
  3. Pragya Rastogi 2013-11-13

    Tested and Verified fix with: OSX: 10.8.5 Xcode:5.0 Appcelerator Studio: 3.2.0.201311122045 SDK: 3.2.0.v20131112180422 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(3.5-inch) iOS 7.0

JSON Source