我正在開發iphone應用程序。 需要顯示5條記錄在 ,當我到達頁面結束然後接下來的5條記錄將需要加載使用自動滾動。自動滾動或結束少滾動Iphone
初始5個記錄顯示完成。
當我到達頁面末尾時,滾動不起作用。
可以任意一個。
我正在開發iphone應用程序。 需要顯示5條記錄在 ,當我到達頁面結束然後接下來的5條記錄將需要加載使用自動滾動。自動滾動或結束少滾動Iphone
初始5個記錄顯示完成。
當我到達頁面末尾時,滾動不起作用。
可以任意一個。
我找到了解決辦法。我的代碼如下,
myTable.addEventListener('scroll', function(e){
if (Ti.Platform.osname === 'iphone')
{
var offset = e.contentOffset.y;
var height = e.size.height;
var total = offset + height;
var theEnd = e.contentSize.height;
// this condition will check whether the scroll reach end or not?
if (theEnd == total)
{
//call the function once again.
loadContents();
}
}
});
我希望...有人會使用它。
@ Suresh.g
您可以使用 「滾動型」 財產 「或contentHeight:Ti.UI.Size(或 」自動「)」。
當您使用「ScrollView」時,它會根據您的要求設置默認高度。
您還可以啓用 showHorizontalScrollIndicator:真實,
更多信息,請閱讀此blog
我想查看加載器圖標,當用戶到達頁面的結尾,動態內容將自動加載。 –