Skip to content

Commit

Permalink
stash changes for another animation
Browse files Browse the repository at this point in the history
  • Loading branch information
kkafar committed Nov 5, 2024
1 parent 81fe5ed commit 23300c6
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions ios/RNSScreenStackAnimator.mm
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,21 @@ - (void)animateSlideFromBottomWithTransitionContext:(id<UIViewControllerContextT
completion:completionBlock];
} else {
// we don't want the EaseInOut option when swiping to dismiss the view, it is the same in default animation option
[UIView animateWithDuration:[self transitionDuration:transitionContext]
delay:0.0
options:UIViewAnimationOptionCurveLinear
animations:animationBlock
completion:completionBlock];
UIViewPropertyAnimator *animator =
[[UIViewPropertyAnimator alloc] initWithDuration:[self transitionDuration:transitionContext]
curve:UIViewAnimationCurveLinear
animations:animationBlock];
[animator addCompletion:^(UIViewAnimatingPosition finalPosition) {
completionBlock(finalPosition == UIViewAnimatingPositionEnd);
}];
[animator setUserInteractionEnabled:YES];
_inFlightAnimator = animator;
//
// [UIView animateWithDuration:[self transitionDuration:transitionContext]
// delay:0.0
// options:UIViewAnimationOptionCurveLinear
// animations:animationBlock
// completion:completionBlock];
}
}
}
Expand Down

0 comments on commit 23300c6

Please sign in to comment.