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

iOS: Complex non-composite layouts show before lay-out since 3.3.0

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 3.5.0, Release 4.0.0
    • Component/s: iOS
    • Environment:

      Titanium 3.2.3.GA (works)
      Titanium 3.3.0.GA & 3.4.0.GA (fails)
      iOS version is not relevant
      Target simulator or device is not relevant

    • Story Points:
      21
    • Sprint:
      2014 Sprint 24 SDK

      Description

      A few weeks ago I started noticing that a lot of apps where I used complex horizontal and vertical layouts were showing their children before they were layed out. I made a simple test case that showed this has been the case since 3.3.0 and is not related to iOS 8 which I first assumed.

      NOTE: In some occasions I've (as well as Jason) have seen the children not being layed out at all!

      Test case

      Run the following test case again Titanium 3.3.0.GA or later:

      var win = Ti.UI.createWindow({
        backgroundColor: 'white'
      });
       
      win.add(Ti.UI.createLabel({
        text: 'Click'
      }));
       
      win.addEventListener('click', function(e) {
       
        var win = Ti.UI.createWindow({
          backgroundColor: 'red',
          layout: 'vertical',
        });
       
        win.addEventListener('click', function(e) {
          win.close();
        });
       
        for (var i = 0; i < 500; i++) {
          win.add(Ti.UI.createLabel({
            top: (i === 0) ? 20 : 0,
            color: 'white',
            text: 'Line #' + (i + 1)
          }));
        }
       
        win.open();
       
      });
       
      win.open();
      

      Attached videos

      The movies I recorded show clearly that the children show center-top (except the first label which has top:20 before being layed out at their proper place.

      Before Titanium 3.3.x the children views didn't show up until they were layed out, which of course looks better.

      • 323-710.mov Titanium 3.2.3 & iOS 7.1 (vertical)
      • 330-710.mov Titanium 3.3.0 & iOS 7.1 (vertical)
      • 330-710-horizontal.mov Titanium 3.3.0 & iOS 7.1 (horizontal)
      • 340-810.mov Titanium 3.4.0 & iOS 8.1 (vertical)

        Attachments

        1. 323-710.mov
          243 kB
        2. 330-710.mov
          384 kB
        3. 330-710-horizontal.mov
          496 kB
        4. 340-810.mov
          561 kB

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              fokkezb Fokke Zandbergen
              Reviewer:
              Jon Alter
              Tester:
              Ewan Harris
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code