When I change the height of the cell with the animation (using beginUpdates (), endUpdates ()) I have a very strange animation for my section footer: it moves to the bottom of the table.
here is the simplest code that I could write
func tableView(tableView: UITableView, titleForFooterInSection section: Int) -> String? { return "footer" } func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { return cellHeight } func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 1 } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { return tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as UITableViewCell } func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { tableView.beginUpdates() cellHeight += 20; tableView.endUpdates() }
How could I avoid this animation problem?
source share