Fix unrecognized selector for 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: sammy-SC

Differential Revision: D18201528

fbshipit-source-id: 0dd3dad7cabe08589a597039c1dae44da868e1e5
This commit is contained in:
Andrew Monshizadeh
2019-10-30 11:21:47 -07:00
committed by Facebook Github Bot
parent 2c7a907b08
commit 35b8b06db9
@@ -139,7 +139,9 @@ using namespace facebook::react;
// iOS requires to end refreshing before unmounting.
[_refreshControl endRefreshing];
_scrollViewComponentView.scrollView.refreshControl = nil;
if (@available(iOS 10.0, macOS 13.0, *)) {
_scrollViewComponentView.scrollView.refreshControl = nil;
}
_scrollViewComponentView = nil;
}