简体   繁体   English

objective-c uitableview 何时出队单元格没有意义

[英]objective-c uitableview when does dequeing cells not make sense

I know the general guideline is to dequeue cells as they go off the screen in a uitableviewcell.我知道一般准则是使单元格出列,因为它们 go 在 uitableviewcell 中离开屏幕。

I would think this recommendation/guideline is relaxed when you have the uitableview acting as a form and have possibly different types of uitableviewcells in there.当您将 uitableview 用作表单并且其中可能有不同类型的 uitableviewcells 时,我认为此建议/指南会放宽。

eg label/textfield, label/uiswitch, label/label/uidatepicker.例如标签/文本字段、标签/uiswitch、标签/标签/uidatepicker。

Such a tableview in my case has been limited to 4-5 cells.就我而言,这样的表格视图仅限于 4-5 个单元格。

Do we need to worry about dequeing form based (4-5 cells) tableviews?我们是否需要担心基于表单(4-5 个单元格)的表格视图的出队?

What do y'all do when faced with a tableview with different types of cells in it?当面对一个包含不同类型单元格的表格视图时,你们会怎么做?

For every type of cell you will use a different identifier.对于每种类型的单元格,您将使用不同的标识符。 In you case, with 4 or 5 cells, it will not have a big impact on performances if you don't follow the guidelines.在您的情况下,使用 4 或 5 个单元,如果您不遵循指南,它不会对性能产生很大影响。

These guidelines must be followed when you scroll a lot of cells.当您滚动大量单元格时,必须遵循这些准则。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM