Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4743] iOS: Center Y in views is broken

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-05-18T16:15:08.000+0000
Affected Version/sn/a
Fix Version/sRelease 2.0.1
ComponentsiOS
Labelsqe-port
ReporterPedro Enrique
AssigneeNeeraj Gupta
Created2011-07-21T17:09:55.000+0000
Updated2012-08-13T16:23:02.000+0000

Description

Setting the center.y coordinate on a view is ignored and it picks up the x instead

The Code

var win = Ti.UI.createWindow({
    backgroundColor: '#55ff55'
});
 
var red = Ti.UI.createView({
    width: 100,
    height: 150,
    top: 100,
    backgroundColor: 'red'
});
win.add(red);
 
var blue = Ti.UI.createView({
    width: 10,
    height: 10,
    center: {x: '50%', y: '100%'},
    backgroundColor: 'blue'
});
red.add(blue);
 
win.open();

The Problem

The blue view (dot) should be at the bottom of the red view

QA forum link

http://developer.appcelerator.com/question/122903/bugreport-viewcentery-with-percentage-broken

Comments

  1. Junaid Younus 2012-05-18

    Tested with 2.0.1GA2 on the iOS simulator, unable to reproduce the issue. Ticket closed.
  2. Rima Umbrasas 2012-08-13

    Verified fixed with mobile sdk-2.2.0.v20120810080115 Titanium Studio, build: 2.1.1.201207271312 Device: Ipad 5.1

JSON Source