Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-2172

iOS: TableViewRow with { animated:false } doesn't work, still animated

    Details

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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dsefton Daniel Sefton
                Reporter:
                jmasip Jordi Masip i Riera
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Integration