Project: titanium
Issue TIMOB-18102: iOS: ScrollableView.currentPage initialized at index 3, displays index 1
h5.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 h6.To reproduce: Unzip attachment into any Resources folder for a Classic Titanium project. # Run sample as iPhone6 and select red box # Watch the monitor logs. # Run sample as iPhone5/Android and select red box # Watch the monitor logs. The console displays the following: {code} 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 {code} h6.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. {code} //AccountSwiper.js	return this.swiper; //<-- Uncomment to 'resolve' issue	return swiperContainerView; {code}
Story points: 13