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

iOS: horizontalWrap for scrollviews with horizontal layouts do not work when there are nested views

    Details

      Description

      Problem

      ScrollView does not show elements when using "horizontal" layout.

      Test case

      To see this issue run this example:

      function createContent() {
          var wrapper = Ti.UI.createView({
              width: Ti.UI.FILL,
              height: Ti.UI.SIZE,
              backgroundColor: '#f00',
      		horizontalWrap: true,
              layout: 'horizontal'
          });
           
          var label1 = Ti.UI.createLabel({
              text: 'Label 1',
              width: '50%'
          });
           
          var cb1 = Ti.UI.createSwitch({
              value: false
          });
           
          wrapper.add(label1);
          wrapper.add(cb1);
           
          return wrapper;
      }
       
      var win = Ti.UI.createWindow({
          navBarHidden: true
      });
       
      var scrollView = Ti.UI.createScrollView({
          height: Ti.UI.FILL,
          width: Ti.UI.FILL,
          backgroundColor: '#0f0',
          layout: 'horizontal',
          //layout: 'vertical',
          contentHeight: Ti.UI.SIZE,
          contentWidth: Ti.UI.FILL
      });
       
      win.add(scrollView);
       
      for (var i = 0; i < 10; ++i) {
          scrollView.add(createContent());
      }
       
      var table = Ti.UI.createTableView({
          backgroundColor: '#00f',
          height: Ti.UI.SIZE
      });
       
      scrollView.add(table);
       
      var rows = [];
      for (i = 0; i < 25; ++i) {
          rows.push({ title: 'Row ' + i});
      }
       
      table.setData(rows);
       
      win.open();
      

      You should see only first row (Label1 and switch)

      Expected result

      All data should be visible, like it is on Android (run this example on Android to see how it looks)

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              ivan.skugor Ivan Skugor
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration