我已经准备了很多帖子,但我并不清楚它是如何工作的。根据我对性能原因的理解,同一个单元格被重用,但我有一组查询,如
- 在出队回收过程中,最初在内存中为任何设备创建了多少个单元格,例如是否创建了任何特定数量的单元格,例如 N 个单元格
- 在滚动时哪个特定的单元格被重用
- 静态tableview是否支持dequeue
最佳答案
During dequeue recycle how many cells are initially created in memory for any device like is there any specific number of cells are created eg N number of cell
- 创建 TableView 时所需的函数包含 tableView(_ tv: UITV, numberOfRowsInSection section: Int) -> Int & tableView(_ tv: UITV, numberOfSection section: Int) -> Int 他们俩过去都知道该 TableView 中将显示多少个部分和部分中的行。
On scroll which particular cell gets reused
- 当 UITableViewCell 滚出屏幕时,它会被放入池中以供重用。 dequeueReusableCell(withIdentifier:) 方法从重用池中获取一个。 如果可能,它会重用具有给定标识符的 UITableViewCell。 否则它会复制 Storyboard中的原型(prototype)。
Does static tableview supports dequeue
- 静态 TableView 与出列可重用 TableView 相反,因为我们已经知道单元格的数量以及它们的外观。我们不能重复使用它们。
关于swift - tableView 或 collectionview dequeue 可重复使用如何快速工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51855487/