Skip to content

Commit 07a7bf2

Browse files
author
Adam Gleitman
committed
Fix transform prop
1 parent a064b85 commit 07a7bf2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/react-native/React/Views/UIView+React.m

+8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#import "RCTAssert.h"
1313
#import "RCTLog.h"
1414
#import "RCTShadowView.h"
15+
#import "RCTView.h"
1516

1617
@implementation RCTPlatformView (React) // [macOS]
1718

@@ -306,9 +307,16 @@ static void updateTransform(RCTPlatformView *view) // [macOS]
306307
transform = view.reactTransform;
307308
}
308309

310+
#if !TARGET_OS_OSX // [macOS]
309311
view.layer.transform = transform;
310312
// Enable edge antialiasing in rotation, skew, or perspective transforms
311313
view.layer.allowsEdgeAntialiasing = transform.m12 != 0.0f || transform.m21 != 0.0f || transform.m34 != 0.0f;
314+
#else // [macOS
315+
if ([view isKindOfClass:[RCTView class]]) {
316+
[(RCTView *)view setTransform3D:transform];
317+
[view setNeedsDisplay:YES];
318+
}
319+
#endif // macOS]
312320
}
313321

314322
- (UIViewController *)reactViewController

0 commit comments

Comments
 (0)