Animate cell height change in UITableView [duplicate]

筅森魡賤 提交于 2019-12-12 09:30:33

问题


Possible Duplicate:
Can you animate a height change on a UITableViewCell when selected?

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

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?


回答1:


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



来源:https://stackoverflow.com/questions/1064902/animate-cell-height-change-in-uitableview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!