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 动态UITableViewCell高度内的动态UITextView?_Iphone_Ios_Uitableview_Uitextview - Fatal编程技术网

Iphone 动态UITableViewCell高度内的动态UITextView?

Iphone 动态UITableViewCell高度内的动态UITextView?,iphone,ios,uitableview,uitextview,Iphone,Ios,Uitableview,Uitextview,我只是没有找到解决这个问题的好办法。我在UITableViewCell中有一个子类UITextView。现在我有动态调整TextView大小的功能,但单元格没有。这是因为heightforrowatinexpath仅在加载时被调用。如何在不调用cellForRowWithIndexPath(即重新加载数据)的情况下调用此函数 任何帮助都会很好!谢谢 其实很简单,只需在uitableviewcell中使用类似的内容即可 [tableView beginUpdates]; self.frame =

我只是没有找到解决这个问题的好办法。我在UITableViewCell中有一个子类UITextView。现在我有动态调整TextView大小的功能,但单元格没有。这是因为heightforrowatinexpath仅在加载时被调用。如何在不调用cellForRowWithIndexPath(即重新加载数据)的情况下调用此函数


任何帮助都会很好!谢谢

其实很简单,只需在uitableviewcell中使用类似的内容即可

[tableView beginUpdates];
self.frame = CGRectMake(0,0,width,new height);
[tableView endUpdates];

不记得了,但是uitableviewcell的superview应该是uitableview。

似乎没有更新tableview。我当前的手机文本正在增长,覆盖下一行。我的TableView似乎不小心与我的插座断开了连接。。。工程伟大,与一些调整!