Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19537] iOS: Changing height of a view with animations not working

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 4.1.1
Fix Version/sn/a
ComponentsiOS
LabelsTCSupportTriage, engTriage
ReporterDaniel Plunkett
AssigneeUnknown
Created2014-09-30T17:18:10.000+0000
Updated2019-12-06T22:07:52.000+0000

Description

Expected behavior: The animation on the view should make the view appear to shrink to a height of 0. Actual behavior: Expected behavior only happens for the last child view in a vertical layout view. All other views simply disappear with no animation. Test Case
var win = Ti.UI.createWindow({
    backgroundColor: 'white',
    layout: 'vertical'
});

for (var i = 0; i < 10; i++) {
    newRow = createRow();
    win.add(newRow);
}

function createRow() {
    var row = Ti.UI.createView({
        height: 45,
        width: Ti.UI.FILL,
        top: 1,
        backgroundColor: 'black'
    });
    row.addEventListener('click', function(e) {
        row.animate({
            height: 0,
            duration: 2000
        });
    });
    return row;
}

win.open();

Comments

No comments

JSON Source