Deprecate calculateChildFrames from RCTScrollView

Summary:
This function is unused. (Followup to D21941946)

Changelog: [iOS] Deprecate calculateChildFrames from RCTScrollView

Reviewed By: sammy-SC

Differential Revision: D22071415

fbshipit-source-id: 0c996ab02df1431ee9cfa082bc99681a2ec7118c
This commit is contained in:
Peter Argany
2020-06-16 12:50:16 -07:00
committed by Facebook GitHub Bot
parent 3ff671c704
commit 62aa84a325
2 changed files with 0 additions and 52 deletions
-30
View File
@@ -600,36 +600,6 @@ RCT_SCROLL_EVENT_HANDLER(scrollViewDidScrollToTop, onScrollToTop)
RCT_FORWARD_SCROLL_EVENT(scrollViewDidScroll : scrollView);
}
- (NSArray<NSDictionary *> *)calculateChildFramesData
{
NSMutableArray<NSDictionary *> *updatedChildFrames = [NSMutableArray new];
[[_contentView reactSubviews] enumerateObjectsUsingBlock:^(UIView *subview, NSUInteger idx, __unused BOOL *stop) {
// Check if new or changed
CGRect newFrame = subview.frame;
BOOL frameChanged = NO;
if (self->_cachedChildFrames.count <= idx) {
frameChanged = YES;
[self->_cachedChildFrames addObject:[NSValue valueWithCGRect:newFrame]];
} else if (!CGRectEqualToRect(newFrame, [self->_cachedChildFrames[idx] CGRectValue])) {
frameChanged = YES;
self->_cachedChildFrames[idx] = [NSValue valueWithCGRect:newFrame];
}
// Create JS frame object
if (frameChanged) {
[updatedChildFrames addObject:@{
@"index" : @(idx),
@"x" : @(newFrame.origin.x),
@"y" : @(newFrame.origin.y),
@"width" : @(newFrame.size.width),
@"height" : @(newFrame.size.height),
}];
}
}];
return updatedChildFrames;
}
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
{
_allowNextScrollNoMatterWhat = YES; // Ensure next scroll event is recorded, regardless of throttle