Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ - (void)invalidateLayer
layer.shadowPath = nil;
}

#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000 /* __IPHONE_17_0 */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be defined for visionOS too right? Checking real quick...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems so 👍🏽

// Stage 1.5. Cursor / Hover Effects
if (@available(iOS 17.0, *)) {
UIHoverStyle *hoverStyle = nil;
Expand All @@ -621,6 +622,7 @@ - (void)invalidateLayer
}
[self setHoverStyle:hoverStyle];
}
#endif

// Stage 2. Border Rendering
const bool useCoreAnimationBorderRendering =
Expand Down
2 changes: 2 additions & 0 deletions packages/react-native/React/Views/RCTView.m
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ static void RCTUpdateShadowPathForView(RCTView *view)

static void RCTUpdateHoverStyleForView(RCTView *view)
{
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000 /* __IPHONE_17_0 */
if (@available(iOS 17.0, *)) {
UIHoverStyle *hoverStyle = nil;
if ([view cursor] == RCTCursorPointer) {
Expand All @@ -917,6 +918,7 @@ static void RCTUpdateHoverStyleForView(RCTView *view)
}
[view setHoverStyle:hoverStyle];
}
#endif
}

- (void)updateClippingForLayer:(CALayer *)layer
Expand Down