我正在將數據加載到UITableView中。第一負載發生正確的第10個細胞中UITableView indexPath.row不會增加
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {}
的indexPath.row增量正確和數據加載到從所述數據源中的適當單元中。當到達桌子底部時,我再執行一次加載。現在FUNC的tableView被調用但它在
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
停留在indexPath.row = 9,我實現了一個檢查,它似乎已被添加行適當數量。
編輯:我有我的第二個uitableview(在這個場景中有兩個)的問題檢查器是一個打印語句被調用並返回適當的uitableView,這發生在tableView卡住相同的值之前。
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if tableView == self.table {
return users2.count
}
else {
print("married barry", tableFeedCount)
return tableFeedCount
}
}
請問你的 '檢查' 的代碼看起來像工作? – tek3