Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9137] iOS: TableView scroll event contentOffset returning 0

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-05-29T11:36:43.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 2.1.0, Sprint 2012-11 API
ComponentsiOS
LabelsSupportTeam, api, ipass1, regression
ReporterEduardo Gomez
AssigneeSabil Rahim
Created2012-05-15T15:16:12.000+0000
Updated2017-03-20T22:01:59.000+0000

Description

Issue

As the title

Tested on

iOS simulator

Expected behavior

Pull down to refresh works in Titanium SDKs 2.0.x

Current behavior

Pull down to refresh doesn't works in Titanium SDKs 2.1.x

Steps to reproduce

1. Run Kitchen Sink demos 2. Go to sample: Base UI tab > Views > TableViews > Pull to refresh

Titanium SDK version: 2.0.2 (05/10/12 22:31 82d3920)

[INFO] One moment, building ...
[INFO] Titanium SDK version: 2.0.2 (05/10/12 22:31 82d3920)
[INFO] iPhone Device family: universal
[INFO] iPhone SDK version: 5.0
[INFO] iPhone simulated device: iphone
[INFO] Performing full rebuild. This will take a little bit. Hold tight...
[INFO] Skipping JS compile, running from simulator
[WARN] The project seems to be having custom info.plist which does not contain  the CFBundleShortVersionString key
[INFO] Generating the missing CFBundleShortVersionString key
[INFO] Detected compiler plugin: ti.log/0.1
[INFO] Compiler plugin loaded and working for ios
[INFO] Performing clean build
[INFO] Compiling localization files
[INFO] Detected custom font: comic_zine_ot.otf
[INFO] Launching application in Simulator
[INFO] Launched application in Simulator (31.21 seconds)
[INFO] Application started
[INFO] KitchenSink/1.0 (2.0.2.v20120510223154.82d3920)
[INFO] Welcome to Kitchen Sink for Titanium/2.0.2

Titanium SDK version: 2.1.0 (05/02/12 17:33 85e7af3)

[INFO] One moment, building ...
[INFO] Titanium SDK version: 2.1.0 (05/02/12 17:33 85e7af3)
[INFO] iPhone Device family: universal
[INFO] iPhone SDK version: 5.0
[INFO] iPhone simulated device: iphone
[INFO] Performing full rebuild. This will take a little bit. Hold tight...
[INFO] Skipping JS compile, running from simulator
[WARN] The project seems to be having custom info.plist which does not contain  the CFBundleShortVersionString key
[INFO] Generating the missing CFBundleShortVersionString key
[INFO] Detected compiler plugin: ti.log/0.1
[INFO] Compiler plugin loaded and working for ios
[INFO] Performing clean build
[INFO] Compiling localization files
[INFO] Detected custom font: comic_zine_ot.otf
[INFO] Launching application in Simulator
[INFO] Launched application in Simulator (35.35 seconds)
[INFO] Application started
[INFO] KitchenSink/1.0 (2.1.0.v20120502173348.85e7af3)
[INFO] Welcome to Kitchen Sink for Titanium/

contentOffset

http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.UI.TableView-event-scrollEnd

Attachments

FileDateSize
Pull2Refresh.jpg2012-05-15T15:17:31.000+000057841

Comments

  1. Paul Dowsett 2012-05-21

    I just discovered the bug independently, exactly as described here. Thanks for raising it.
  2. stefano di luca 2012-05-27

    same problem, when touchEnd is fired with the tableView scrolled down the "e.contentOffset.y" report a value of 0. Also the scroll event continue to run after the tableView is released and return to top.
     
       table_view.addEventListener('scroll', function(e) {
           var offset = e.contentOffset.y;
           if(offset <= -65.0 && !pulling) {
               var t = Ti.UI.create2DMatrix();
               t = t.rotate(-180);
       
               //**** WHEN offset BECOME <= -65 PULLING IS CORRECTLY SET TO TRUE
               pulling = true;
       
               arrow.animate({
                   transform : t,
                   duration : 180
               });
               
           }else if(pulling && offset > -65.0 && offset < 0) {
       
               //**** IF TABLEVIEW IS RELEASED WITH offset <= -65 PULLING ASSUME FALSE*
               //**** THIS ONLY HAPPEN IN 2.1.0*
               pulling = false;
       
               var t = Ti.UI.create2DMatrix();
               arrow.animate({
                   transform : t,
                   duration : 180
               });
       
           }
         }
       });
       
    Any new on this?? Thank you
  3. Sabil Rahim 2012-05-29

  4. Sabil Rahim 2012-05-29

    Closing bug as invalid. As this is the new expected behavior. Tested on iPhone Sim 4.3 and 5.0 on Xcode 4.3 on Titanium SDK 2.1.0 build a04ec8f4e51c915e009222c3e11180a3f04a128c
  5. Lee Morris 2017-03-20

    Closing ticket as invalid.

JSON Source