konstantinbueschel
10/27/2016 - 11:09 AM

ScrollView-RefreshControl.js

var win = Ti.UI.createWindow({
    backgroundColor: "#fff"
});
 
var refreshControl = Ti.UI.createRefreshControl({
    tintColor: "red"
});
 
var scroll = Ti.UI.createScrollView({
    backgroundColor: "yellow",
    refreshControl: refreshControl
});
 
refreshControl.addEventListener("refreshstart", function() {
    setTimeout(function() {
        refreshControl.endRefreshing();
    },1000);
})
 
scroll.add(Ti.UI.createLabel({
    text: "Scroll down!"
}));
 
win.add(scroll);
win.open();