Skip to content

Commit

Permalink
chore(ios): Use self.contentView instead of self_>_contentView in…
Browse files Browse the repository at this point in the history
… RCTScrollView
  • Loading branch information
Saadnajmi committed Aug 16, 2024
1 parent 77154c6 commit 2ac08b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react-native/React/Views/ScrollView/RCTScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -938,10 +938,10 @@ - (void)uiManagerWillPerformMounting:(RCTUIManager *)manager
__unused RCTUIManager *uiManager, __unused NSDictionary<NSNumber *, UIView *> *viewRegistry) {
BOOL horz = [self isHorizontal:self->_scrollView];
NSUInteger minIdx = [self->_maintainVisibleContentPosition[@"minIndexForVisible"] integerValue];
for (NSUInteger ii = minIdx; ii < self->_contentView.subviews.count; ++ii) {
for (NSUInteger ii = minIdx; ii < self.contentView.subviews.count; ++ii) {
// Find the first partially or fully visible view. This must be done after we update the content offset
// or it will tend to grab rows that were made visible by the shift in position
UIView *subview = self->_contentView.subviews[ii];
UIView *subview = self.contentView.subviews[ii];
BOOL hasNewView = NO;
if (horz) {
CGFloat leftInset = self.inverted ? self->_scrollView.contentInset.right : self->_scrollView.contentInset.left;
Expand All @@ -953,7 +953,7 @@ - (void)uiManagerWillPerformMounting:(RCTUIManager *)manager
CGFloat y = self->_scrollView.contentOffset.y + bottomInset;
hasNewView = subview.frame.origin.y + subview.frame.size.height > y;
}
if (hasNewView || ii == self->_contentView.subviews.count - 1) {
if (hasNewView || ii == self.contentView.subviews.count - 1) {
self->_prevFirstVisibleFrame = subview.frame;
self->_firstVisibleView = subview;
break;
Expand Down

0 comments on commit 2ac08b8

Please sign in to comment.