1.建一个数据model
![](https://img.haomeiwen.com/i17051779/d6523c8308c94d29.png)
![](https://img.haomeiwen.com/i17051779/1742a72e3a3604cd.png)
2. 需要建立一个计算图片高度的model------frameModel
![](https://img.haomeiwen.com/i17051779/4943e14caa8dc41c.png)
![](https://img.haomeiwen.com/i17051779/b47aa46cd271f73d.png)
3. 为UIImage写一个延展, 添加计算图片高度的方法
![](https://img.haomeiwen.com/i17051779/e80a4b042d866294.png)
![](https://img.haomeiwen.com/i17051779/f7bc5c1a52a6d2d0.png)
4.在UItableVIewCell里面写set方法为imageView的frame赋值
![](https://img.haomeiwen.com/i17051779/1f2d3f7498901fde.png)
![](https://img.haomeiwen.com/i17051779/72224981ddae5908.png)
5UIviewController的table的代理方法 ---heightForRowAtindexPath里面返回cell高度
![](https://img.haomeiwen.com/i17051779/a1a143cc12b05f3c.png)
1.建一个数据model
2. 需要建立一个计算图片高度的model------frameModel
3. 为UIImage写一个延展, 添加计算图片高度的方法
4.在UItableVIewCell里面写set方法为imageView的frame赋值
5UIviewController的table的代理方法 ---heightForRowAtindexPath里面返回cell高度
本文标题:UItableVIewCell添加网络图片动态计算图片高度
本文链接:https://www.haomeiwen.com/subject/vpdmnqtx.html
网友评论