Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-13401

iOS 6: insertRowBefore uses animation with animated set to false and animationStyle set to none

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 3.0.2, Release 3.1.0
    • Fix Version/s: Release 5.1.0
    • Component/s: iOS
    • Environment:

      3.0.2 GA
      3.1 CI
      iOS 6.0.1

    • Story Points:
      5
    • Sprint:
      2015 Sprint 19 SDK

      Description

      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 (not tested)

      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();
      })();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hknoechel Hans Knöchel
                Reporter:
                mrvvoo Markus Wutzler
                Reviewer:
                Chee Kiat Ng (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-16142
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration