Skip to content

Commit

Permalink
RCTRefreshControl: Updates condition for applying offset
Browse files Browse the repository at this point in the history
RCTRefreshControl: Updates condition for applying offset to be `!= 0.f`, not `> 0.f`. This will allow negative offsets, if needed.
  • Loading branch information
objectivecosta committed Nov 15, 2022
1 parent 4438584 commit c035025
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/Views/RefreshControl/RCTRefreshControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ - (void)_applyProgressViewOffset
// 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) {
if (_progressViewOffset != 0.f) {
UIView *scrollView = self.superview;
UIView *target = scrollView.superview;
CGPoint rawOffset = CGPointMake(0, _progressViewOffset);
Expand Down

0 comments on commit c035025

Please sign in to comment.