Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23316] iOS: Ti.UI.ScrollableView.currentPage always returns 'null'

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2016-07-26T19:59:27.000+0000
Affected Version/sRelease 5.2.2
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterBert Grantges
AssigneeAngel Petkov
Created2016-05-04T17:09:05.000+0000
Updated2016-07-26T19:59:27.000+0000

Description

On iOS the currentPage property of the Ti.UI.ScrollableView is always returning null. Expectation is that this should return the currentIndex of the visible page.

Comments

  1. Angel Petkov 2016-05-05

    [~bgrantges@appcelerator.com] Hi, could you please provide a reproducible case and also which SDK is this is happening on ? If you was to run the demoCode underneath on the master version or 5.2.3 it works just as expected.
       var win = Ti.UI.createWindow();
       
       var view1 = Ti.UI.createView({ backgroundColor:'#123' });
       var view2 = Ti.UI.createView({ backgroundColor:'#246' });
       var view3 = Ti.UI.createView({ backgroundColor:'#48b' });
       
       var scrollableView = Ti.UI.createScrollableView({
         views:[view1,view2,view3],
         showPagingControl:true
       });
       
       scrollableView.addEventListener("scrollend",function(e){
       	Ti.API.info(scrollableView.getCurrentPage());
       });
       
       win.add(scrollableView);
       win.open();
       
  2. Hieu Pham 2016-05-24

    We should close this ticket since it's not reproducible on master, and there has been no update for the last 2 weeks.

JSON Source