Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Bug with replacement animations still appearing #29

Open
ValCanBuild opened this issue Feb 26, 2019 · 3 comments
Open

Bug with replacement animations still appearing #29

ValCanBuild opened this issue Feb 26, 2019 · 3 comments

Comments

@ValCanBuild
Copy link

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 ?

@onmyway133
Copy link
Owner

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

@ValCanBuild
Copy link
Author

@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.

@NikitaChugaynov
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants