Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3458] iOS: ScrollableView not firing swipe or touchend events

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-06-08T18:44:33.000+0000
Affected Version/sRelease 1.6.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterDaniel Tome
AssigneeIngo Muschenetz
Created2011-04-15T03:45:26.000+0000
Updated2017-06-08T18:44:33.000+0000

Description

I've added code and description of the issue here:

http://developer.appcelerator.com/question/117589/scrollableview-not-firing-swipe-nor-touchend-events"> http://developer.appcelerator.com/question/117589/scrollableview-no...

Currently if a user swipes quickly a scrollableview, then there is no way of knowing on what page they are until they stop scrolling.

Another issue is described here:
http://developer.appcelerator.com/question/117588/scrollableview-not-firing-scroll-event-always"> http://developer.appcelerator.com/question/117588/scrollableview-no...

That has an example of the scroll event not getting fired all the time.

This has been tested with Ti 1.6 and several iPhones from 3 to 4.2

Comments

  1. hal 2011-04-15

    Daniel, please paste your code in your tickets (or in gist) rather than providing a link to it, just in case the address changes at some point. Thanks.

    Hence, your code:

       var win = Titanium.UI.createWindow({  
           backgroundColor:'#fff'
       });
        
       var views_arr = [];
        
       for(var i=0; i<10; i++){
           views_arr[i] = Ti.UI.createView({
               width: 200,
               height: 100,
               borderColor:'#000' 
           });
           var lbl = Titanium.UI.createLabel({
               text:'view '+i,
               color:'#000',
           });
           views_arr[i].add(lbl);
       }
        
       scrollableView = Titanium.UI.createScrollableView(
       {
           views: views_arr,
           top: 0,
           left: 0,
           right: 0,
           borderWidth: 0,
           showPagingControl:true
       });
        
       scrollableView.addEventListener('scroll', function(e)
       {
           Titanium.API.info("Image Scrolled current page: " + e.currentPage);
       });
        
       scrollableView.addEventListener('touchstart', function(e)
       {
           Titanium.API.info("Image touchstart: " + e.x);
       });
        
       scrollableView.addEventListener('touchmove', function(e)
       {
           Titanium.API.info("Image touchmove: " + e.x);
       });
        
       scrollableView.addEventListener('touchend', function(e)
       {
           Titanium.API.info("Image touchend: " + e.x);
       });
       win.add(scrollableView);
       win.open();
       
  2. richards.justin (at gmail) 2011-04-15

    I am having the same issue.I am having the same issue trying to create a workaround for the swipe event not working as well lol.

    Touch start works fine, just no touch end.
    Using it on a View.

    Tested on android 2.2
    Ti Sdk 1.2.2

  3. richards.justin (at gmail) 2011-04-15

    Ti SDK 1.6
    Ti Developer 1.2.2

    My Mistake.

  4. hal 2011-04-15

    Richard

    This is an iOS ticket, assigned to the iOS team. If you need advice about a specific issue you have, please raise it with the community in the http://developer.appcelerator.com/questions/created">Q&A (as explained in the http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium"> Contributing to Titanium guide) rather than introduce errors into tickets. Note that your issue is described in ticket #3476, which you would have found by using https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets?q=state%3Aopen+ScrollableView+%2Btagged%3Aandroid"> this search.

    Thank you for your understanding.

  5. Lee Morris 2017-06-08

    Closing ticket due to time passed and lack on input for the past 6 years. Any problems, please open a new ticket.

JSON Source