Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scroll view handler state change events #2985

Merged
merged 9 commits into from
Aug 5, 2024

Conversation

coado
Copy link
Contributor

@coado coado commented Jul 10, 2024

Description

Regarding this issue, this PR fixes the events that are sent from iOS whenever the state change occurs in a RCTScrollView.

Test plan

Tested on simulator and real device.

apple/RNGestureHandler.m Outdated Show resolved Hide resolved
apple/RNGestureHandler.m Outdated Show resolved Hide resolved
apple/Handlers/RNNativeViewHandler.mm Outdated Show resolved Hide resolved
apple/Handlers/RNNativeViewHandler.mm Outdated Show resolved Hide resolved
apple/Handlers/RNNativeViewHandler.mm Outdated Show resolved Hide resolved
apple/RNGestureHandler.mm Outdated Show resolved Hide resolved
apple/RNGestureHandler.mm Outdated Show resolved Hide resolved
apple/Handlers/RNNativeViewHandler.mm Outdated Show resolved Hide resolved
apple/RNGestureHandler.mm Outdated Show resolved Hide resolved
return NO;
}

- (UIScrollView *)retrieveScrollView:(UIView *)view
Copy link
Member

Choose a reason for hiding this comment

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

I believe this line breaks macOS compilation. You should be able to replace UIView with RNGHUIView.

You will also need to do something about UIScrollView which will not exist on macOS. You should be able to use the TARGET_OS_OSX flag and conditionally replace it with NSScrollView.

apple/RNGestureHandler.mm Show resolved Hide resolved
coado and others added 4 commits July 18, 2024 10:18
Co-authored-by: Jakub Piasecki <jakub.piasecki@swmansion.com>
Co-authored-by: Jakub Piasecki <jakub.piasecki@swmansion.com>
@coado coado merged commit 88b1ae2 into main Aug 5, 2024
3 checks passed
@coado coado deleted the @dmalecki/scroll-view-state-change-events branch August 5, 2024 09:52
j-piasecki added a commit that referenced this pull request Aug 7, 2024
## Description

In
#2985
some changes were made regarding handling of ScrollViews by the native
handler. I have no idea how the build passed on the PR itself but a type
only available on iOS was used which causes macOS not to build.

This PR cleans it up.

## Test plan

Build macOS example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants