Fix Issue 10718: Add iOS support for progressViewOffset (#30737)

Summary:
Fixes https://github.com/facebook/react-native/issues/10718, bringing `progressViewOffset` support to iOS.

Thanks to Taylor123 for the initial PR upon which this fix is based.

## Changelog

[iOS] [Fix] - `progressViewOffset` prop of `RefreshControl` and `VirtualizedList` now works on iOS

Pull Request resolved: https://github.com/facebook/react-native/pull/30737

Test Plan:
Tested with quick-and-dirty sample app.

![progressViewOffset-iOS](https://user-images.githubusercontent.com/1563532/104526540-82fe1d80-55b7-11eb-9f99-e025bedf4874.gif)

## Documentation

The corresponding documentation update PR can be found [here](https://github.com/facebook/react-native-website/pull/2441).

Reviewed By: kacieb

Differential Revision: D26813977

Pulled By: sammy-SC

fbshipit-source-id: 45cc5a647d70e44a29c6391b7586cb41ca011bef
This commit is contained in:
David Biedenbach
2021-03-11 10:27:25 -08:00
committed by Facebook GitHub Bot
parent 896baf79d5
commit 310a6bcf4b
5 changed files with 36 additions and 7 deletions
@@ -52,10 +52,6 @@ type AndroidProps = $ReadOnly<{|
* Size of the refresh indicator.
*/
size?: ?('default' | 'large'),
/**
* Progress view top offset
*/
progressViewOffset?: ?number,
|}>;
export type RefreshControlProps = $ReadOnly<{|
@@ -72,6 +68,11 @@ export type RefreshControlProps = $ReadOnly<{|
* Whether the view should be indicating an active refresh.
*/
refreshing: boolean,
/**
* Progress view top offset
*/
progressViewOffset?: ?number,
|}>;
/**
@@ -162,7 +163,6 @@ class RefreshControl extends React.Component<RefreshControlProps> {
colors,
progressBackgroundColor,
size,
progressViewOffset,
...props
} = this.props;
return (