Arka sayfadan yükleme verilerini sayfalama ile yapmaya çalışıyorum. Bunu gördüm, ancak tüm zamanları yükler. Bu doğru mu, yoksa yanlış bir şey mi yapıyorum?UITableView Sayfalandırması - Alttaki Yenileme Swift'deki Yeni Verileri Yükleme Yenile
Şimdiden teşekkürler. değil cellForRowAtIndexPath ama UIScrollViewDelegate daha fazla veri kontrol etmek
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell{
let cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as UITableViewCell
print(indexPath.row)
if (indexPath.row + 1 < self.TotalRowsWithPages) {
cell.textLabel?.text = "\(self.myarray!.[indexPath.row].body)"
} else {
cell.textLabel?.text = "Loading more data...";
// User has scrolled to the bottom of the list of available data so simulate loading some more if we aren't already
if (!self.isLoading) {
self.isLoading = true;
self.TotalRowsWithPages = self.TotalRowsWithPages + self.PageSize
self.getmoredata()
}
}
return cell
}
Swift 4'te çalışmaz –
@UtkuDalmaz Bana tam olarak neyin işe yaramadığını söyler misiniz? –
İkili işleç '==', 'UIScrollView' ve '_' türünde işlenenler için uygulanamaz. a1> –