diff --git a/packages/react-native/React/Views/RCTConvert+Transform.h b/packages/react-native/React/Views/RCTConvert+Transform.h index 9ad72aef37e6fa..728e85fa79fa3c 100644 --- a/packages/react-native/React/Views/RCTConvert+Transform.h +++ b/packages/react-native/React/Views/RCTConvert+Transform.h @@ -6,9 +6,12 @@ */ #import "RCTConvert.h" +#import "UIView+React.h" @interface RCTConvert (Transform) + (CATransform3D)CATransform3D:(id)json; ++ (RCTTransformOrigin)RCTTransformOrigin:(id)json; + @end diff --git a/packages/react-native/React/Views/RCTConvert+Transform.m b/packages/react-native/React/Views/RCTConvert+Transform.m index 348d4ec4abe8cc..8248b5892a6f38 100644 --- a/packages/react-native/React/Views/RCTConvert+Transform.m +++ b/packages/react-native/React/Views/RCTConvert+Transform.m @@ -144,4 +144,11 @@ + (CATransform3D)CATransform3D:(id)json return transform; } ++ (RCTTransformOrigin)RCTTransformOrigin:(id)json +{ + RCTTransformOrigin transformOrigin = { + [RCTConvert YGValue:json[0]], [RCTConvert YGValue:json[1]], [RCTConvert CGFloat:json[2]]}; + return transformOrigin; +} + @end diff --git a/packages/react-native/React/Views/RCTTransformOrigin.h b/packages/react-native/React/Views/RCTTransformOrigin.h deleted file mode 100644 index 1823fd91f1ebfe..00000000000000 --- a/packages/react-native/React/Views/RCTTransformOrigin.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import -#import - -typedef struct { - YGValue x; - YGValue y; - CGFloat z; -} RCTTransformOrigin; diff --git a/packages/react-native/React/Views/RCTViewManager.m b/packages/react-native/React/Views/RCTViewManager.m index 9b4775ceec3c22..5f5c6ce19016a5 100644 --- a/packages/react-native/React/Views/RCTViewManager.m +++ b/packages/react-native/React/Views/RCTViewManager.m @@ -15,7 +15,6 @@ #import "RCTConvert.h" #import "RCTLog.h" #import "RCTShadowView.h" -#import "RCTTransformOrigin.h" #import "RCTUIManager.h" #import "RCTUIManagerUtils.h" #import "RCTUtils.h" @@ -122,13 +121,6 @@ @implementation RCTConvert (UIAccessibilityTraits) UIAccessibilityTraitNone, unsignedLongLongValue) -+ (RCTTransformOrigin)RCTTransformOrigin:(id)json -{ - RCTTransformOrigin transformOrigin = { - [RCTConvert YGValue:json[0]], [RCTConvert YGValue:json[1]], [RCTConvert CGFloat:json[2]]}; - return transformOrigin; -} - @end @implementation RCTViewManager diff --git a/packages/react-native/React/Views/UIView+React.h b/packages/react-native/React/Views/UIView+React.h index 46bd1660aae98d..fbc8ca0f94c80d 100644 --- a/packages/react-native/React/Views/UIView+React.h +++ b/packages/react-native/React/Views/UIView+React.h @@ -8,11 +8,17 @@ #import #import -#import +#import #import @class RCTShadowView; +typedef struct { + YGValue x; + YGValue y; + CGFloat z; +} RCTTransformOrigin; + @interface UIView (React) /**