如何在tableview钛合金中自动滚动到tableviewrowdata的底部?

时间:2016-04-06 19:12:38

标签: titanium titanium-mobile titanium-alloy appcelerator-titanium

我在tableview中将我的tableviewrow数据包含在钛合金应用中。我怎样才能到达tableviewrow数据的最后位置?我想在点击UI按钮加载tableviewrow数据时向下滚动到页面底部(tableview)

谢谢 拉吉

1 个答案:

答案 0 :(得分:1)

使用:ScrollToIndex

e.g:

var colors = ['orange', 'blue', 'orange', 'yellow'];

var scrollToBottom=function(e){
var lastIndex=(colors.length-1);
  $.tableview.scrollToIndex(lastIndex);
};