Skip to content

Commit

Permalink
RefreshControl Position Bug
Browse files Browse the repository at this point in the history
Summary:
Refresh bug #7976
This bug has persisted for 3 versions of React Native.   Currently everyone is having to do a silly fix, documented in the bug.   I spent an hour trying to find the source of the bug.   Failing to find the issue quickly, I've just decided to make this simple bugfix.

According to janicduplessis #7976 we will likely be re-writing this control in iOS 10.
Closes #9249

Differential Revision: D3817227

fbshipit-source-id: f98282aadeca3e85239836f589eda901d454f2ce
  • Loading branch information
GantMan authored and Facebook Github Bot 4 committed Sep 4, 2016
1 parent 13994d5 commit dcdf16a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions React/Views/RCTRefreshControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ - (void)layoutSubviews
{
[super layoutSubviews];

// Fix for bug #7976
// TODO: Remove when updating to use iOS 10 refreshControl UIScrollView prop.
if (self.backgroundColor == nil) {
self.backgroundColor = [UIColor clearColor];
}

// If the control is refreshing when mounted we need to call
// beginRefreshing in layoutSubview or it doesn't work.
if (_currentRefreshingState && _isInitialRender && _initialRefreshingState) {
Expand Down

0 comments on commit dcdf16a

Please sign in to comment.