DeepDiff icon indicating copy to clipboard operation
DeepDiff copied to clipboard

Bug with replacement animations still appearing

Open ValCanBuild opened this issue 6 years ago • 3 comments

For some reason, even if you specify reload(replacementAnimations: .none) the tableView still updates the item with an animation the first time it replaces it.

It seems that stackoverflow suggests wrapping the reloadRows logic in a UIView.performWithoutAnimation {} ` block. Could you handle this case @onmyway133 ?

ValCanBuild avatar Feb 26 '19 14:02 ValCanBuild

@ValCanBuild Nice catch, not sure if this issue persists in certain iOS versions 🤔 do you want to submit a PR?

onmyway133 avatar Feb 27 '19 14:02 onmyway133

@onmyway133 it definitely happens in the latest iOS (12.1) so yes, it can. Come to think of it, though, not sure how safe my proposed change is cause what if the user wants to not have replacement animations but still do some animations when they rebind their data? If we just add a performWithoutAnimation as a fix on the library level we'll break that ability.

ValCanBuild avatar Feb 27 '19 15:02 ValCanBuild

.none is not "without animation", it's a default animation case: https://developer.apple.com/documentation/uikit/uitableview/rowanimation/none

NikitaChugaynov avatar Jul 18 '22 00:07 NikitaChugaynov