Skip to content

Commit

Permalink
RCTRefreshControl: Added explainer comment to clarify purpose to futu…
Browse files Browse the repository at this point in the history
…re readers
  • Loading branch information
objectivecosta committed Nov 9, 2022
1 parent b80cfb3 commit 4438584
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion React/Views/RefreshControl/RCTRefreshControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ - (void)_applyProgressViewOffset
// the coordinate space of the RefreshControl. This ensures that the control respects any
// offset in the view hierarchy, and that progressViewOffset is not inadvertently applied
// multiple times.


// Setting the UIRefreshControl's frame breaks integration with ContentInset from the superview
// if it is a UIScrollView. This integration happens when setting the UIScrollView's .refreshControl
// property. For this reason, setting the frame manually should be avoided, if not needed.
if (_progressViewOffset > 0.f) {
UIView *scrollView = self.superview;
UIView *target = scrollView.superview;
Expand Down

0 comments on commit 4438584

Please sign in to comment.