【问题标题】:How to give animation to a height change on a UITableViewCell when selected? [duplicate]选择时如何为 UITableViewCell 上的高度变化提供动画? [复制]
【发布时间】:2014-09-04 05:53:26
【问题描述】:

我正在使用UITableView

表格中有显示的数据列表。我想在用户单击它时为单元格设置动画。

我该怎么做?

【问题讨论】:

  • 你做过研究吗?显示您尝试过的代码并解释错误之处。
  • 查看下面提到的链接:Click Here

标签: ios uitableview


【解决方案1】:

试试看。我想它会对你有所帮助。

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

  [tableView beginUpdates];
  [tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationTop];
  [tableView endUpdates];

}

【讨论】:

    猜你喜欢
    • 2010-12-26
    • 1970-01-01
    • 1970-01-01
    • 2010-10-02
    • 2013-09-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多