我在 UITableView 中有 2 个部分。表格视图需要保持编辑模式,但只有第一部分是可编辑的。具体来说,我希望第二部分的显示方式与表格未处于编辑模式时的显示方式相同(tableviewcells 是其原始宽度,而不是左侧与第一个(可编辑)部分的单元格对齐,这些单元格右对齐,宽度比非编辑模式时小约 20%,并且左侧有编辑 (-) 图标)。注意:这里的问题仅在于单元格的外观,而不在于可编辑单元格与不可编辑单元格的功能方面。
有人知道这在单个 UITableView 中是否可能吗?
I've got 2 sections in a UITableView. The tableview needs to stay in edit mode, but only the first section is editable. Specifically, I want the second section to display as it would if the table were not in edit mode (tableviewcells are their original widths in stead of the left side being in line with the cells of the first (editable) section, which are aligned right, about 20% less wide than when in non-editing mode, and have the editing (-) icon to their left). NOTE: the problem here is only with the appearance of the cells, not with the functional aspect of editable vs. non-editable cells.
Anyone know if this is possible within a single UITableView?
发布评论
评论(1)
您是否实现了
tableView:canEditRowAtIndexPath:
在你的UITableViewDataSource
中?这应该可以为您提供所需的控制。Have you implemented
tableView:canEditRowAtIndexPath:
in yourUITableViewDataSource
? That should give you the control you're looking for.