动画中的UITableView单元格高度变化 [英] Animate cell height change in UITableView

查看:168
本文介绍了动画中的UITableView单元格高度变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  <一href=\"http://stackoverflow.com/questions/460014/can-you-animate-a-height-change-on-a-uitableviewcell-when-selected\">Can选择当您在动画一个UITableViewCell的高度变化?

我想,当它被选中来改变一个UITableViewCell的高度。我能够通过定义来做到这一点。

I'd like to change the height of a UITableViewCell when it gets selected. I'm able to do this by defining

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

和调用的tableview的reloadData当细胞被选中,但我想有变化的动画。如何去对此有什么建议?

and calling the tableview's reloadData when the cell gets selected, but I'd like to have the change be animated. Any suggestions on how to go about this?

推荐答案

尝试调用reloadData在动画块已设置的参数,这将迫使一个新的高度后?

Try calling reloadData in an animation block after you have set parameters that will force a new height?

这篇关于动画中的UITableView单元格高度变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆