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

iOS: TableviewRow - Cannot run code from TIMOB-4367

    Details

      Description

      Details: Was doing regression testing and tried to run code from TIMOB-4367 on iOS. But, no rows appeared.

      Steps to reproduce:

      1. Run code on iOS:

      app.js

      var win = Ti.UI.createWindow({ backgroundColor:'#fff' });
       
      var btn = Ti.UI.createButton({
          color: 'black', layout:'center',
          title: 'Create big table view'
      });
      win.add(btn);
      win.open();
      btn.addEventListener('click', function() {
          var newWin = Ti.UI.createWindow({
              backgroundColor: '#fff',
              layout:'vertical'
          });
          var back = Ti.UI.createButton({
              color: 'black', top: 10,
              title: 'Back'
          });
          newWin.add(back);
       
          var tv = createBigTableView();
          newWin.add(tv);
          newWin.open();
       
          function clickListener() {
              back.removeEventListener('click', clickListener);
              newWin.close();
              tv.data = null;
              tv = null;
              newWin = null;
              back = null;
          }
       
          back.addEventListener('click', clickListener);
      });
       
      function createBigTableView() {
          var data = [];
          for (i = 1; i <= 1500; i++) {
              data.push(createCustomTableViewRow('RowsNMore', i));
          }
          return Ti.UI.createTableView({
              top:0, bottom:0, left:0, right:0,
              separatorColor: 'white',
              data: data
          });
      }
       
      function createCustomTableViewRow(label1text, label2text) {
          var row = Ti.UI.createTableViewRow({ className: 'customTVRow' });
          var vw = Ti.UI.createView({layout: 'vertical'});
          row.add(vw);
          vw.add(Ti.UI.createLabel({
              text: label1text, color: 'black',
              font: {fontSize: '9pt', fontWeight: 'bold'}
          }));
          vw.add(Ti.UI.createLabel({
              text: label2text, color: 'gray',
              font: {fontSize: '7pt', fontWeight: 'normal'}
          }));
          return row;
      }
      

      Actual: No red rows are displayed. See attachment.
      Expected: Should see 1500 rows like on Android. See attachment.

        Attachments

        1. androidRows.png
          androidRows.png
          57 kB
        2. iosRows.png
          iosRows.png
          28 kB
        3. iosRows2.png
          iosRows2.png
          58 kB

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                wluu Wilson Luu (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code