RefreshControl Position Bug
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 https://github.com/facebook/react-native/pull/9249 Differential Revision: D3817227 fbshipit-source-id: f98282aadeca3e85239836f589eda901d454f2ce
This commit is contained in:
parent
13994d5810
commit
dcdf16a0fb
|
@ -33,6 +33,12 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
|
||||||
{
|
{
|
||||||
[super 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
|
// If the control is refreshing when mounted we need to call
|
||||||
// beginRefreshing in layoutSubview or it doesn't work.
|
// beginRefreshing in layoutSubview or it doesn't work.
|
||||||
if (_currentRefreshingState && _isInitialRender && _initialRefreshingState) {
|
if (_currentRefreshingState && _isInitialRender && _initialRefreshingState) {
|
||||||
|
|
Loading…
Reference in New Issue