鑑於在任何給定時間單細胞可見一個UITableView,我怎麼能確定哪個小區是鑑於最而表視圖被滾動?UITableView的一個可見單元:確定哪些是最明顯的
我知道我可以做這個拿到可見單元格數組:做
NSArray *paths = [tableView indexPathsForVisibleRows];
然後拿到最後一個單元格(或第一,或其他):
UITableViewCell* cell = (UITableViewCell*)[tableView cellForRowAtIndexPath:[paths lastObject]];
但如何我比較所有可見的細胞,並確定哪些是最可見的?
這實際上可能使最有意義的,因爲如果釋放觸摸時只有一個單元格可見,滾動時最多可以看到兩個單元格。 – brandonscript 2014-12-11 04:00:59
終於有機會嘗試了 - 效果很好,謝謝! – brandonscript 2014-12-19 22:16:48