Created
April 18, 2016 22:13
-
-
Save MattFoley/46519178115c4a30864f3796d4f87152 to your computer and use it in GitHub Desktop.
React Native Crashing Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event | |
{ | |
__block UIView *hitView; | |
[_stickyHeaderIndices enumerateIndexesWithOptions:0 usingBlock:^(NSUInteger idx, BOOL *stop) { | |
UIView *stickyHeader = [self contentView].reactSubviews[idx]; | |
CGPoint convertedPoint = [stickyHeader convertPoint:point fromView:self]; | |
hitView = [stickyHeader hitTest:convertedPoint withEvent:event]; | |
*stop = (hitView != nil); | |
}]; | |
return hitView ?: [super hitTest:point withEvent:event]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 6 can throw an exception.