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

iOS: ScrollableView.currentPage initialized at index 3, displays index 1

    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
    • Labels:
    • Environment:

      CLI/TiSDK 3.4.1.GA
      iOS8 - iPhone6 (Device/Simulator)

    • Story Points:
      13
    • Sprint:
      2014 Sprint 25 SDK

      Description

      Issue Description

      This occurs on iPhone 6 ONLY scrollableView.currentPage initialized at index 3, displays index 1 (by setting its currentPage variable on creation).

      Expected results: Item at index 3 is shown
      Actual results: Item at index 1 is shown

      To reproduce:

      Unzip attachment into any Resources folder for a Classic Titanium project.

      1. Run sample as iPhone6 and select red box
      2. Watch the monitor logs.
      3. Run sample as iPhone5/Android and select red box
      4. Watch the monitor logs. The console displays the following:

      On Android
      11-25 14:27:29.563: I/TiAPI(1231):  ScrollableView initialized at position: 3
      11-25 14:27:30.573: I/TiAPI(1231):  ScrollableViews current page after one second: 3
       
      On iPhone5
      [INFO] :   Application started
      [INFO] :   ScrollableViewBugRepro/1.0 (3.4.1.5982e8f)
      [INFO] :   button pressed
      [INFO] :   ScrollableView initialized at position: 3
      [INFO] :   ScrollableViews current page after one second: 3
       
      On iPhone6
      [INFO] :   Application started
      [INFO] :   ScrollableViewBugRepro/1.0 (3.4.1.5982e8f)
      [INFO] :   button pressed
      [INFO] :   ScrollableView initialized at position: 3
      [INFO] :   ScrollableViews current page after one second: 1
      

      Additional information

      If we do not put this.swiper (the scrollableView) into a container view, then the issue goes away only so long as its parent container has a 'vertical' layout (the parent container in the sample app is FirstView.js).

      When this 'vertical' layout property is removed from FirstView, we see the issue return, but slightly differently – the index gets set to 2, instead of 1 (when it is initialized as 3).

      Unfortunately, we cannot use this as a workaround, as the view structure we need to build for the actual app needs the scrollableView to be in a container with other views, or to be set up without the vertical layout.

              //AccountSwiper.js
      	return this.swiper; //<-- Uncomment to 'resolve' issue
      	return swiperContainerView;
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jalter Jon Alter
                Reporter:
                egomez Eduardo Gomez (Inactive)
                Reviewer:
                Vishal Duggal (Inactive)
                Tester:
                Wilson Luu (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration