【问题标题】:UITableView is getting interaction when changing rows with animation使用动画更改行时,UITableView 正在获得交互
【发布时间】:2010-04-29 03:32:49
【问题描述】:

我在关闭交互设置的 nib 文件上有一个表格视图。我正在为这样的部分更改设置动画:

[myTableView beginUpdates];
[myTableView deleteSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:YES];
[myTableView insertSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:YES];
[myTableView endUpdates];

问题是,当我这样做时,行变得可选择。如何在保持动画的同时禁用交互?

【问题讨论】:

    标签: iphone uitableview animation


    【解决方案1】:

    使用这个

    self.tableView.userInteractionEnabled=NO;

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-09-23
      • 1970-01-01
      • 2023-04-03
      • 1970-01-01
      • 2022-10-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多