From fc23784fe749cd88cb183b73212a4e247385fc2e Mon Sep 17 00:00:00 2001 From: rcaferati Date: Wed, 23 Nov 2016 11:44:48 -0800 Subject: [PATCH] Fix LayoutAnimation delete scaleXY animation Summary: This fix the issue https://github.com/facebook/react-native/issues/11066. It's more a workaround but it fixes the scaling down animation on component unmount using LayoutAnimation. ![scale_test](https://cloud.githubusercontent.com/assets/8358797/20537196/16f7ff24-b0e4-11e6-8870-6525466017f2.gif) Closes https://github.com/facebook/react-native/pull/11073 Differential Revision: D4226704 fbshipit-source-id: 64c7663411cc5e703c3ae8a6d3d4de0f0bcf6c96 --- React/Modules/RCTUIManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Modules/RCTUIManager.m b/React/Modules/RCTUIManager.m index aa4d54ada..4926f7387 100644 --- a/React/Modules/RCTUIManager.m +++ b/React/Modules/RCTUIManager.m @@ -816,7 +816,7 @@ RCT_EXPORT_METHOD(removeSubviewsFromContainerWithID:(nonnull NSNumber *)containe NSString *property = deleteAnimation.property; [deleteAnimation performAnimations:^{ if ([property isEqualToString:@"scaleXY"]) { - removedChild.layer.transform = CATransform3DMakeScale(0, 0, 0); + removedChild.layer.transform = CATransform3DMakeScale(0.001, 0.001, 0.001); } else if ([property isEqualToString:@"opacity"]) { removedChild.layer.opacity = 0.0; } else {