Augustyniak / RATreeView

Library providing easy-to-use interface for displaying tree structures on iOS and tvOS.
MIT License
2.49k stars 465 forks source link

Can't disable animation? #133

Closed rdougan closed 9 years ago

rdougan commented 9 years ago

I've tried setting rowsExpandingAnimation and rowsCollapsingAnimation to RATreeViewRowAnimationNone but it does not seem to make a difference.

Looking at the code, no matter what I do, even when using UITableViewRowAnimationNone - it still animates.

I noticed some CATransaction stuff in collapseCellForTreeNode:informDelegate: - but removing that also did nothing.

I'm stumped. I've no idea how the animation is actually being performed. What am I missing?

ninjaprox commented 9 years ago

@rdougan: It's behaving correctly. You can try this by inserting/deleting rows in a normal UITableView with UITableViewRowAnimationNone. RATreeView has an UITableView inside to lift heavy job in row insertion and deletion. In addition, RATreeViewRowAnimationNone is just another name of UITableViewRowAnimationNone used in RATreeView so it doesn't affect the animation at all (see here).

rdougan commented 9 years ago

Oh man, I feel so dumb. Thank you!

I disabled the animations by using [UIView setAnimationsEnabled:NO];.