File tree Expand file tree Collapse file tree
React/Views/RefreshControl Expand file tree Collapse file tree Original file line number Diff line number Diff 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;
You can’t perform that action at this time.
0 commit comments