fix(iOS): fix navigation item animation #2492
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixing navigation item animation on iOS. It will use default
EaseInOut
curve, instead of spring.(WIP paste a video)
Note
Possible improvements
Caution
It was noted by @hirbod that the back button flashes when clicked and go-back-animation starts.
Below you can see video of this bug.
This happens because:
Screen.Recording.2024-11-12.at.14.19.10.mov
I wonder what should be the solution to above problem ^ (WIP tag people here). I see three paths:
layer
, remove it & add custom one; this will require some debugging time though & I see coupleof technical issues to pull this off.
Changes
Added
RNSViewPropertyAnimatorCompositor
which proxies and fans out system callbacks to series of animatorsand exposes implicit animator (returned as interruptible animator from stack animator) (the system animates navigation items with curve of interruptible animator).
This is how it looks now:
Screen.Recording.2024-11-12.at.14.20.51.mov
Test code and steps to reproduce
Test1072
.Checklist