Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10838] iOS: verticalAlign does not work for TiUILabel

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-03-26T08:36:13.000+0000
Affected Version/sRelease 2.1.2
Fix Version/sRelease 3.0.2
ComponentsiOS
Labelsapi
ReporterBen S.
AssigneeShameer Jan
Created2012-08-16T15:34:16.000+0000
Updated2017-03-21T22:14:26.000+0000

Description

Problem

The "verticalAlign" attribute doesn't set the vertical alignment of labels.

Test case

var win = Ti.UI.createWindow();

var view = Ti.UI.createView({backgroundColor:"white"});

var label = Ti.UI.createLabel({
	left:50,
	top:50,
	height:300,
	width:200,
	backgroundColor:"red",
	color:"white",
	text:"This is a top-aligned label",
	verticalAlign:Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP
});

view.add(label);
win.add(view);

win.open();

Attachments

FileDateSize
iOS Simulator Screen shot Mar 26, 2013 11.54.32 AM.png2013-03-26T08:36:52.000+00008827
Screen Shot 2012-08-17 at 12.31.58 AM.png2012-08-16T15:34:16.000+000057061

Comments

  1. Davide Cassenti 2012-09-11

    The verticalAlign property is only valid for MobileWeb. Check our documentation at this page for more information: http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.Label-property-verticalAlign Moved the bug as a new feature request.
  2. Ben S. 2012-09-11

    I don't think this is only mobile, cause it's also in documentation: http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.Label-property-verticalAlign This works perfectly with current unstable release (I use 2.2.0 from August). Only with 2.1 it doesn't work.
  3. Neeraj Gupta 2012-09-11

    @Ben - As mentioned in the link you specified (using HTML5 icon), this is a Mobile Web only property in 2.1 release.
  4. Ben S. 2012-09-16

    Hi neeraj, thx. So this is a feature of the next upcoming major release?
  5. Shameer Jan 2013-03-26

    Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 5.1,6.0
  6. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced and due to the above comments.

JSON Source