Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2172] iOS: TableViewRow with { animated:false } doesn't work, still animated

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2013-07-03T17:22:10.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsanimated, animations, ios, tableViewRow
ReporterJordi Masip i Riera
AssigneeDaniel Sefton
Created2013-07-01T23:13:25.000+0000
Updated2016-03-08T07:41:09.000+0000

Description

The same as TIMOB-13401: *Description* insertRowBefore uses a fade animation although animated is set to false and animationStyle is set to NONE (see code sample) *Expected result* row is simply inserted without an animation *Current result* row is inserted with fade animation *Additional notes* might also apply to insertRowAfter and appendRow and deleteRow *Sample*
/*
* Single Window Application Template:
* A basic starting point for your application.  Mostly a blank canvas.
*
* In app.js, we generally take care of a few things:
* - Bootstrap the application with any data we need
* - Check for dependencies like device type, platform version or network connection
* - Require and open our top-level UI component
*
*/
 
//bootstrap and check dependencies
if (Ti.version < 1.8) {
    alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later');
}
 
// This is a single context application with mutliple windows in a stack
(function() {
    //determine platform and form factor and render approproate components
    var win = Ti.UI.createWindow({
        width : Ti.UI.FILL,
        height : Ti.UI.FILL,
    });
 
    var tv = Ti.UI.createTableView({
        width : Ti.UI.FILL,
        height : Ti.UI.FILL,
    });
    var rows = [];
    for (var i = 0; i < 50; i++) {
        rows.push(Ti.UI.createTableViewRow({
            title : 'Row ' + i
        }));
    }
    var row = Ti.UI.createTableViewRow({
        title : 'Insert Row Before 0'
    });
    row.addEventListener('click', function() {
        tv.insertRowBefore(0, {
            title : 'Row inserted before 0'
        });
    });
    rows.push(row);
    var row = Ti.UI.createTableViewRow({
        title : 'Insert Row Before 1'
    });
    row.addEventListener('click', function() {
        tv.insertRowBefore(1, {
            title : 'Row inserted before 1 w/o anim'
        }, {
            animationStyle : Ti.UI.iPhone.RowAnimationStyle.NONE
        });
    });
    rows.push(row);
    var row = Ti.UI.createTableViewRow({
        title : 'Insert Row Before this'
    });
    row.addEventListener('click', function(e) {
        tv.insertRowBefore(e.index, {
            title : 'Row inserted before 0'
        });
    });
    rows.push(row);
    var row = Ti.UI.createTableViewRow({
        title : 'Insert Row Before this'
    });
    row.addEventListener('click', function(e) {
        tv.insertRowBefore(e.index, {
            title : 'Row inserted before w/o anim'
        }, {
            animationStyle : Ti.UI.iPhone.RowAnimationStyle.NONE,
            animated : false,
        });
    });
    rows.push(row);
    tv.data = rows;
    win.add(tv);
    win.open();
})();

Comments

  1. Daniel Sefton 2013-07-03

    Hi Jordi, Any reason you filed it if you know it's the same as TIMOB-13401? Closing as duplicate.

JSON Source