Skip to content

Commit dcdf16a

Browse files
GantManFacebook Github Bot 4
authored andcommitted
RefreshControl Position Bug
Summary: Refresh bug facebook#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 facebook#7976 we will likely be re-writing this control in iOS 10. Closes facebook#9249 Differential Revision: D3817227 fbshipit-source-id: f98282aadeca3e85239836f589eda901d454f2ce
1 parent 13994d5 commit dcdf16a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

React/Views/RCTRefreshControl.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ - (void)layoutSubviews
3333
{
3434
[super layoutSubviews];
3535

36+
// Fix for bug #7976
37+
// TODO: Remove when updating to use iOS 10 refreshControl UIScrollView prop.
38+
if (self.backgroundColor == nil) {
39+
self.backgroundColor = [UIColor clearColor];
40+
}
41+
3642
// If the control is refreshing when mounted we need to call
3743
// beginRefreshing in layoutSubview or it doesn't work.
3844
if (_currentRefreshingState && _isInitialRender && _initialRefreshingState) {

0 commit comments

Comments
 (0)