diff --git a/ios/RNSScreen.mm b/ios/RNSScreen.mm index 644dd48c59..b19b4a0b96 100644 --- a/ios/RNSScreen.mm +++ b/ios/RNSScreen.mm @@ -109,10 +109,19 @@ - (void)updateBounds { #ifdef RCT_NEW_ARCH_ENABLED if (_state != nullptr) { - auto newState = react::RNSScreenState{RCTSizeFromCGSize(self.bounds.size)}; - // _state->updateState(std::move(newState)); - UINavigationController *navctr = _controller.navigationController; - [navctr.view setNeedsLayout]; + CAAnimation *sizeAnimation = [self.layer animationForKey:@"bounds.size"]; + if (sizeAnimation != nil && self.layer.presentationLayer.bounds.size.height > self.bounds.size.height) { + CABasicAnimation *callbackOnlyAnimation = [CABasicAnimation new]; + callbackOnlyAnimation.duration = sizeAnimation.duration; + callbackOnlyAnimation.beginTime = sizeAnimation.beginTime; + callbackOnlyAnimation.delegate = self; + [self.layer addAnimation:callbackOnlyAnimation forKey:@"rns_sheet_animation"]; + } else { + auto newState = react::RNSScreenState{RCTSizeFromCGSize(self.bounds.size)}; + _state->updateState(std::move(newState)); + UINavigationController *navctr = _controller.navigationController; + [navctr.view setNeedsLayout]; + } } #else CAAnimation *sizeAnimation = [self.layer animationForKey:@"bounds.size"];