Skip to content

Commit ccdb305

Browse files
committed
Restore refresh spinner fix
Fixes #30912 Reverts #31024 which was not shown to fix the issue
1 parent 81c895f commit ccdb305

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

React/Views/RefreshControl/RCTRefreshControl.m

+5-12
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ - (void)layoutSubviews
4141
{
4242
[super layoutSubviews];
4343

44+
// Fix for bug #7976
45+
if (self.backgroundColor == nil) {
46+
self.backgroundColor = [UIColor clearColor];
47+
}
48+
4449
// If the control is refreshing when mounted we need to call
4550
// beginRefreshing in layoutSubview or it doesn't work.
4651
if (_currentRefreshingState && _isInitialRender) {
@@ -49,18 +54,6 @@ - (void)layoutSubviews
4954
_isInitialRender = false;
5055
}
5156

52-
- (void)didMoveToWindow
53-
{
54-
[super didMoveToWindow];
55-
56-
// Since iOS 14 there seems to be a bug where refresh control becomes
57-
// visible if the view gets removed from window then added back again.
58-
// Calling endRefreshing fixes the layout.
59-
if (!_currentRefreshingState) {
60-
[super endRefreshing];
61-
}
62-
}
63-
6457
- (void)beginRefreshingProgrammatically
6558
{
6659
UInt64 beginRefreshingTimestamp = _currentRefreshingStateTimestamp;

0 commit comments

Comments
 (0)