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

iOS: Views disappear from ScrollableView on change

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 5.1.2, Release 5.1.1
    • Fix Version/s: Release 5.2.0
    • Component/s: iOS
    • Environment:
    • Story Points:
      8

      Description

      This is a regression from pre 5.1.0.GA SDKs.
      When changing the views in a ScrollableView the current view changes to a black screen. Interacting with the scrollable view will bring the view back, but it does not display until then.

      Steps to reproduce
      1. Create a new project with the below code
      2. Run the project and scroll between views
      3. Click the "Hello" button at the bottom of the screen

      Expected Results
      The view changes to the new view set in the scrollable view

      Actual Results
      The view is black and remains so until a scroll or partial scroll occurs

      Notes
      The scrollableView stays on the correct page, the view just does not display.
      The test app in TIMOB-20087 encounters the same issue on iOS 9.2 devices/sims

      Code

      var win = Ti.UI.createWindow();
       
      var view1 = Ti.UI.createView({ height: 300, backgroundColor:'#123' });
      var view2 = Ti.UI.createView({ height: 300, backgroundColor:'#246' });
      var view3 = Ti.UI.createView({ height: 300, backgroundColor:'#48b' });
       
      var view4 = Ti.UI.createView({ height: 300, backgroundColor:'#f34' });
      var view5 = Ti.UI.createView({ height: 300, backgroundColor:'#3f4' });
      var view6 = Ti.UI.createView({ height: 300, backgroundColor:'#34f' });
       
      var scrollableView = Ti.UI.createScrollableView({
        views:[view1,view2,view3],
        showPagingControl:true
      });
       
      win.add(scrollableView);
      var button = Titanium.UI.createButton({
         title: 'Hello',
         bottom: 10,
         width: 100,
         height: 50
      });
      win.add(button);
      button.addEventListener('click',function(e)
      {
         scrollableView.views = [view4,view5,view6];
         Titanium.API.info("You clicked the button");
      });
       
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cng Chee Kiat Ng (Inactive)
                Reporter:
                ewieber Eric Wieber
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code