如何从cellForRowAtIndexPath更改行高?

Hre*_*ich 1 height row cell uitableview swift

我需要使用UITableView 更改cellForRowAtIndexPath中的行高.

heightForRowAtIndexPath在cellForRowAtIndexPath之前执行,但在cellForRowAtIndexPath中我将内容设置为行,取决于必须重新计算的高度.

And*_*rew 10

你不能,唯一可以而且应该改变的地方是heightForRowAtIndexPath 但是还有其他解决方案可以解决你的问题,这里解释得非常好

我鼓励你检查第三个解决方案whitch启用行高度估计.