Skip to content

Commit 4c4948b

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
Fix unrecognised selector crash on iOS 9
Summary: Refresh control is only available in iOS 10+ > https://developer.apple.com/documentation/uikit/uiscrollview/2127691-refreshcontrol?language=objc changelog: Fix crash in `RCTPullToRefreshViewComponentView` on iOS 10 Reviewed By: cpojer Differential Revision: D18161020 fbshipit-source-id: c789433f132e68fc71c875e1da79bfe4fd799a44
1 parent aa27645 commit 4c4948b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm

+3-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ - (void)_attach
125125
return;
126126
}
127127

128-
_scrollViewComponentView.scrollView.refreshControl = _refreshControl;
128+
if (@available(iOS 10.0, macOS 13.0, *)) {
129+
_scrollViewComponentView.scrollView.refreshControl = _refreshControl;
130+
}
129131
}
130132

131133
- (void)_detach

0 commit comments

Comments
 (0)