react-native/React
Janic Duplessis 102a31c13e Fix RefreshControl layout on screen rotation and consecutive pull to refresh not working properly
Summary:Fixes the RefreshControl layout after a screen rotation. See #6311 for a more detailed explanation. I fixed it by adjusting the frame of the RefreshControl in `layoutSubviews` of the parent ScrollView.

While working on fixing this I noticed that when doing a 'pull to refresh' and then not scrolling and wait for it to end the next one will not behave like the first one (it will require pulling further down for the spinner to start spinning). I fixed that too by scrolling the scrollview back to 0 manually before calling `UIRefreshControl.endRefreshing`.

**Test plan (required)**
Tested using the UIExplorer RefreshControl example.

When doing a pull to refresh and then rotating the screen the RefreshControl must stay positioned properly.
Doing multiple consecutive pull to refresh without scrolling after should all behave the same.

Fixes #6311
Closes https://github.com/facebook/react-native/pull/6359

Differential Revision: D3023727

fb-gh-sync-id: f50ae52ea769c2b3e5025c362544a8809a71aa00
shipit-source-id: f50ae52ea769c2b3e5025c362544a8809a71aa00
2016-03-08 04:00:34 -08:00
..
Base Initialize bridge on a background queue 2016-03-07 09:31:26 -08:00
Executors Fix JS deallocation on load errors 2016-03-07 09:46:36 -08:00
Layout updated css-layout and fixed callsites 2015-12-21 10:18:41 -08:00
Modules Rename dev menu option to Hot Reloading on boths ios and android 2016-03-06 10:12:25 -08:00
Profiler fix RCTPerfMonitor display unit error 2016-02-26 04:54:32 -08:00
React.xcodeproj Fix OSS iOS build 2016-02-17 07:38:33 -08:00
Views Fix RefreshControl layout on screen rotation and consecutive pull to refresh not working properly 2016-03-08 04:00:34 -08:00