Project: titanium
Issue TIMOB-20199: iOS: Views disappear from ScrollableView on change
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|https://jira.appcelerator.org/browse/TIMOB-20087] encounters the same issue on iOS 9.2 devices/sims *Code* {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(); {code}
Story points: 8