[TIMOB-8933] iOS: Redefine "scroll" event in ScrollableView, and add "scrollEnd"
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-06-04T00:00:36.000+0000 |
Affected Version/s | Release 2.0.1 |
Fix Version/s | n/a |
Components | iOS |
Labels | api, qe-port, release-note |
Reporter | Russell Frank |
Assignee | Vishal Duggal |
Created | 2012-04-29T18:25:15.000+0000 |
Updated | 2012-12-12T19:58:24.000+0000 |
Description
The
ScrollView
class has a scroll
event which is fired repeatedly during scrolling. However, the ScrollableView
class does not have anything like this.
We need an event for ScrollableView
s that informs us when a ScrollableView
is being moved. Tragically, the scroll
event for ScrollableViews
already does something else -- it fires when the whole view has been scrolled to another page.
So, I suggest we call the event scrolling
. It will be emitted continuously as the view is scrolled, and will contain such properties as
* currentPage
- currently active page index
* currentPageAsFloat
- currently active page index as a float, so if halfway between pages, this will have a value of 0.5
* view
- currently active view
I'm working on an implementation of this and will pull request the iOS implementation, docs, and tests within the next couple of days.
Pull request submitted on GitHub: [#2101](https://github.com/appcelerator/titanium_mobile/pull/2101)
Pull request by community user has been submitted, waiting for action.
Changed title to reflect that this ended up being a redefinition of "scroll" and addition of "scrollEnd".
Pull merged
Environment used for verification - Tested with Titanium SDK: 2.2.0.v20120830182512 Tested with Titanium Studio: 2.1.2.201208301612 Device - Simulator iOS 5.1 Machine OS - MAC 10.8