Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 当';删除';滑进来?_Iphone_Cocoa Touch_Uitableview_Heightforrowatindexpath - Fatal编程技术网

Iphone 当';删除';滑进来?

Iphone 当';删除';滑进来?,iphone,cocoa-touch,uitableview,heightforrowatindexpath,Iphone,Cocoa Touch,Uitableview,Heightforrowatindexpath,我有一个使用UITableViewCellStyleSubtitle样式的UITableView。我还通过使用 cell.textLabel.lineBreakMode = UILineBreakModeWordWrap; cell.textLabel.numberOfLines = 0; 然后在heightsforrowatinexpath中计算所需的高度。但是,当用户滑入“删除”按钮时,单元格中的文本会向外延伸,并与单元格的上下边缘重叠。如何像使用默认单元格样式那样截断文本?(或者,我可以

我有一个使用
UITableViewCellStyleSubtitle
样式的
UITableView
。我还通过使用

cell.textLabel.lineBreakMode = UILineBreakModeWordWrap;
cell.textLabel.numberOfLines = 0;
然后在
heightsforrowatinexpath
中计算所需的高度。但是,当用户滑入“删除”按钮时,单元格中的文本会向外延伸,并与单元格的上下边缘重叠。如何像使用默认单元格样式那样截断文本?(或者,我可以再次更改单元格高度吗?

答案是

cell.textLabel.numberOfLines = textLabelheight/textLabelFontSize;

这仍然是一个问题。任何人