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

iOS: Cannot dynamically resize a View inside a TableViewRow

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 2.1.1
    • Fix Version/s: 2013 Sprint 09
    • Component/s: iOS
    • Labels:
    • Environment:

      iOS 5.1
      SDK 2.1.1

      Description

      Problem description

      When a View is child of TableViewRow, it becomes impossible to resize it dynamically. Parameters width and height are actually changed, but the view inside the app does not change.

      Steps to reproduce

      1. Test out this app:

      // make a window to test in
      var win = Ti.UI.createWindow( { backgroundColor: 'white' } );
      win.open();
       
       
       
      // WINDOW VIEW (works)
      var wView = Ti.UI.createView( {
          backgroundColor: 'yellow',
          width: 150,
          height: 150,
          top: 25
      } );
      win.add( wView );
      var wViewToggle = false;
      wView.addEventListener( 'click', function () {
          wViewToggle = !wViewToggle;
          if ( wViewToggle ) {
              wView.backgroundColor = 'blue';
              wView.width = 100;
              wView.height = 100;
          } else {
              wView.backgroundColor = 'yellow';
              wView.width = 150;
              wView.height = 150;
          }
       
          Ti.API.info( 'wView.width = ' + wView.width );
          Ti.API.info( 'wView.height =  ' + wView.height );
       
      } );
       
       
       
      // TABLE VIEW (broken)
      var table = Ti.UI.createTableView( {
          top: 200
      } );
      win.add( table );
      var row = Ti.UI.createTableViewRow( {
          backgroundColor: 'red',
          selectionStyle: 'none',
          height: Ti.UI.SIZE
      } );
      table.data = [ row ];
      var tView = Ti.UI.createView( {
          backgroundColor: 'yellow',
          width: 200,
          height: 200
      } );
      row.add( tView );
      var tViewToggle = false;
      tView.addEventListener( 'click', function () {
          tViewToggle = !tViewToggle;
          if ( tViewToggle ) {
              tView.backgroundColor = 'blue';
              tView.width = 100;
              tView.height = 100;
          } else {
              tView.backgroundColor = 'yellow';
              tView.width = 150;
              tView.height = 150;
          }
       
          Ti.API.info( 'tView.width = ' + tView.width );
          Ti.API.info( 'tView.height =  ' + tView.height );
       
      } );
      

      Clicking on the squares, the result should be a resize of the view; while the square on top works (view is inside the window), the second does not (view inside tableviewrow).

        Attachments

          Activity

            People

            • Assignee:
              jithinv@exalture.com jithinpv
              Reporter:
              dcassenti Davide Cassenti
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration