Skip to content
Closed
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
18 changes: 18 additions & 0 deletions React/Views/RCTScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,24 @@ - (void)dockClosestSectionHeader
}
}

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
__block UIView *stickyHeader;

[_stickyHeaderIndices enumerateIndexesWithOptions:0 usingBlock:^(NSUInteger idx, BOOL *stop) {
stickyHeader = [self contentView].reactSubviews[idx];
CGPoint convertedPoint = [stickyHeader convertPoint:point fromView:self];

if ([stickyHeader hitTest:convertedPoint withEvent:event]) {
*stop = YES;
} else {
stickyHeader = nil;
}
}];

return stickyHeader ?: [super hitTest:point withEvent:event];
}

@end

@implementation RCTScrollView
Expand Down