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

iOS: TableViewRow does not return getRect methods

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 9.0.2, Release 9.1.0
    • Fix Version/s: Release 9.3.0
    • Component/s: iOS
    • Labels:
      None
    • Environment:

      MacOS Catalina: 10.15.5 Beta
      Xcode: 11.4
      Java Version: 1.8.0_131
      Android NDK: 21.1.6273396-beta2
      Node.js: 10.16.3
      ""NPM":"5.0.0-1","CLI":"8.0.0-master.10""
      iphon 8 (13.4)

    • Story Points:
      3
    • Sprint:
      2020 Sprint 22

      Description

      When trying to get the rect.height the value does not change even through the tableViewRow height is increasing/changing. On the Android side this is working fine and the value is returned.

      Test Case:

      win = Ti.UI.createWindow({
      backgroundColor: '#AAAAFF',
      layout: 'vertical'
      });
       
      var top = Ti.UI.createView({
      backgroundColor: '#FFAAAA',
      layout: 'horizontal',
      height: Ti.UI.SIZE,
      width: Ti.UI.FILL
      });
       
      var btnPlus = Ti.UI.createButton({title: '+', top: 50, color: 'white', borderWidth:2 });
      btnPlus.addEventListener('click', function() {
      console.log('plus click');
      view.height += 50;
      });
       
      var btnMinus = Ti.UI.createButton({title: '-', top: 50, color: 'white', borderWidth:2 });
      btnMinus.addEventListener('click', function() {
      console.log('minus click');
      view.height -= 50;
      });
       
      var label = Ti.UI.createLabel();
       
      var tableView = Ti.UI.createTableView();
       
      var row = Ti.UI.createTableViewRow({
      height: Ti.UI.SIZE,
      width: Ti.UI.FILL
      });
       
      var view = Ti.UI.createView({
      height: 150,
      backgroundColor: 'blue'
      });
       
      row.add(view);
      tableView.setData([ row ]);
      tableView.addEventListener('postlayout', function onPostLayout() {
      console.log('postlayout', row.rect.height, view.rect.height);
      label.text = [row.rect.height, view.rect.height].join(' \| ');
      });
       
      top.add(btnPlus);
      top.add(btnMinus);
      top.add(label);
       
      win.add(top);
      win.add(tableView);
      win.open();
      

      Test Steps:

      1. Create a new application with the code above
      2. Run the application
      3. Click on the Minus and Plus buttons
      4. Notice label does not change with the correct the values (even though height of the tableViewRow changes)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmathews Gary Mathews
                Reporter:
                smohammed Samir Mohammed
                Reviewer:
                Vijay Singh
                Tester:
                Satyam Sekhri
              • Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration