Replies: 1 comment 4 replies
-
Hi @notcome, I believe for UIKit there is something simpler. You can disable all animations for a lexical scope by doing something like this: UIView.performWithoutAnimation {
store.send(…)
} |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have one feature request for UIKit animation interoperability. Can we add something like
store.send(action, animated: true)
to enable/disable UIKit animation for state changes?For implementation, I suppose we could have a task local value
and wrap the action sending code to a value override:
If my understanding is correct, we could obtain the correct UIAnimationLocals.animated inside the
observe
block.This would be very useful for interacting with UIKit code. For instance, for the
StackNavigationController
, we could use this to decide if we should push a view controller with (from a button tapping) or without (from a universal link) animation.While what I just described could be added outside the library, we would lose interoperability with things like the future
StackNavigationController
. On the other hand, specifying an action to be animated or not is a good and universally accepted abstraction, whereas introducing a fully fledged animation specification system would be an overkill and hard to be introduced into existing codebase.Beta Was this translation helpful? Give feedback.
All reactions