Created
April 17, 2012 00:30
-
-
Save srahim/2402543 to your computer and use it in GitHub Desktop.
ScrollEnd test on tableveiw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Ti.UI.createWindow(); | |
var data = [ | |
{title:"Row 1"}, | |
{title:"Row 2"}, | |
{title:"Row 3"} | |
]; | |
var tableView = Ti.UI.createTableView({ | |
data: data | |
}); | |
win.add(tableView); | |
function loadmoredata() | |
{ | |
// simulate loading | |
for (var c=4;c<100;c++) | |
{ | |
tableView.appendRow({title:"Row "+c}); | |
} | |
} | |
tableView.addEventListener('scrollEnd',function(e) | |
{ | |
Ti.API.info(" ContentOffset :: x: "+e.contentOffset.x+", y: "+e.contentOffset.y); | |
Ti.API.info(" ContentSize :: width: "+e.contentSize.width+", height: "+e.contentSize.height); | |
Ti.API.info(" Size :: width: "+e.size.width+", height: "+e.size.height); | |
}); | |
win.open(); | |
loadmoredata(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment