Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8933] iOS: Redefine "scroll" event in ScrollableView, and add "scrollEnd"

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-06-04T00:00:36.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sn/a
ComponentsiOS
Labelsapi, qe-port, release-note
ReporterRussell Frank
AssigneeVishal Duggal
Created2012-04-29T18:25:15.000+0000
Updated2012-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.

Comments

  1. Russell Frank 2012-04-29

    Pull request submitted on GitHub: [#2101](https://github.com/appcelerator/titanium_mobile/pull/2101)
  2. Junaid Younus 2012-04-30

    Pull request by community user has been submitted, waiting for action.
  3. Bill Dawson 2012-05-09

    Changed title to reflect that this ended up being a redefinition of "scroll" and addition of "scrollEnd".
  4. Blain Hamon 2012-06-04

    Pull merged
  5. Shyam Bhadauria 2012-08-31

    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

JSON Source