Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (scrollend)
Viewing all articles
Browse latest Browse all 15

[BUG] TableView is missing x,y coordinates from scroll event

$
0
0

I need to access the scroll position to do a footer pull to load more, however, the x and y coordinates are not provided in the event object like it states in the documentation.

It is also missing in the scrollEnd event.

Here is the actual object returned by the scroll event

[DEBUG] :  {
[DEBUG] :      bubbles = 1;
[DEBUG] :      cancelBubble = 0;
[DEBUG] :      contentOffset =     {
[DEBUG] :          x = 0;
[DEBUG] :          y = 228;
[DEBUG] :      };
[DEBUG] :      contentSize =     {
[DEBUG] :          height = 1232;
[DEBUG] :          width = 768;
[DEBUG] :      };
[DEBUG] :      size =     {
[DEBUG] :          height = 1004;
[DEBUG] :          width = 768;
[DEBUG] :      };
[DEBUG] :      source = "[object TiUITableView]";
[DEBUG] :      type = scroll;
[DEBUG] :  }
Code
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var rows = [];
for(var i=0; i <= 27; i++)
{
    rows.push({title: "Row #"+i});
}
 
var table = Ti.UI.createTableView({
    data: rows
});
 
table.addEventListener('scroll', function(e){
    Ti.API.debug(e);
});
 
 
win1.add(table);
win1.open();
Application type: mobile

Titanium SDK: 3.0.0.GA

Device: iOS simulator


Viewing all articles
Browse latest Browse all 15

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>