代码之家  ›  专栏  ›  技术社区  ›  Jeff T

在节中展开/折叠UITableView行时出现问题

  •  0
  • Jeff T  · 技术社区  · 8 年前

    问题是: https://www.useloom.com/share/14c1cdd27e7844dcad31dad30d4aa1ce

    切换行时,将执行以下代码:

        section.showPrompts = !section.showPrompts;    
        [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:section] withRowAnimation:UITableViewRowAnimationFade];
    
    1 回复  |  直到 8 年前
        1
  •  1
  •   particleman    8 年前

    您可以尝试在

    [self.tableview beginUpdates];
    ... your code ...
    [self.tableview endUpdates];
    

    使所有动画同步。