react-native/React/Views
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
..
RCTActivityIndicatorViewManager.h
RCTActivityIndicatorViewManager.m
RCTAnimationType.h
RCTAutoInsetsProtocol.h
RCTBorderDrawing.h Support dashed and dotted border styles on iOS 2015-12-23 10:07:28 -08:00
RCTBorderDrawing.m Fixed border smearing issue 2016-01-07 12:03:17 -08:00
RCTBorderStyle.h Add property mapping for `borderStyle` from JS to `RCTView` (iOS) 2015-12-01 09:00:28 -08:00
RCTComponent.h added `didSetProps` for views and shadow views 2015-11-27 04:03:42 -08:00
RCTComponentData.h Removed eager init of all ViewManagers on layout 2016-02-26 08:18:34 -08:00
RCTComponentData.m Removed eager init of all ViewManagers on layout 2016-02-26 08:18:34 -08:00
RCTConvert+CoreLocation.h
RCTConvert+CoreLocation.m
RCTConvert+MapKit.h Added ability to use a custom view for MapView annotations 2015-12-17 06:46:33 -08:00
RCTConvert+MapKit.m Implement draggable annotations on MapView. Closes #2512 2016-01-04 06:38:30 -08:00
RCTDatePicker.h
RCTDatePicker.m
RCTDatePickerManager.h
RCTDatePickerManager.m Replaced RCTSparseArray with NSDictionary 2015-11-14 10:28:28 -08:00
RCTImageComponent.h
RCTMap.h Add MapView annotation callback when it gets / lost the focus 2016-01-29 06:26:30 -08:00
RCTMap.m Conditionally allowing showCompass view property 2016-02-03 11:36:36 -08:00
RCTMapAnnotation.h Implement draggable annotations on MapView. Closes #2512 2016-01-04 06:38:30 -08:00
RCTMapAnnotation.m Add Polyline support to MapView 2015-11-26 08:54:16 -08:00
RCTMapManager.h
RCTMapManager.m Add MapView annotation callback when it gets / lost the focus 2016-01-29 06:26:30 -08:00
RCTMapOverlay.h Add Polyline support to MapView 2015-11-26 08:54:16 -08:00
RCTMapOverlay.m Add Polyline support to MapView 2015-11-26 08:54:16 -08:00
RCTModalHostView.h Add onShow callback for RCTModalHostView 2016-03-03 12:43:36 -08:00
RCTModalHostView.m Add onShow callback for RCTModalHostView 2016-03-03 12:43:36 -08:00
RCTModalHostViewController.h
RCTModalHostViewController.m Support multiple interface orientations in RCTDevLoadingView 2016-02-25 09:52:30 -08:00
RCTModalHostViewManager.h
RCTModalHostViewManager.m Add onShow callback for RCTModalHostView 2016-03-03 12:43:36 -08:00
RCTNavItem.h Added RCTImageSource 2015-12-08 03:32:30 -08:00
RCTNavItem.m Added RCTImageSource 2015-12-08 03:32:30 -08:00
RCTNavItemManager.h
RCTNavItemManager.m Added RCTImageSource 2015-12-08 03:32:30 -08:00
RCTNavigator.h
RCTNavigator.m Update RCTNavigator.m 2016-01-22 17:27:32 -08:00
RCTNavigatorManager.h
RCTNavigatorManager.m Replaced RCTSparseArray with NSDictionary 2015-11-14 10:28:28 -08:00
RCTPicker.h Added support for styling the PickerIOS 2015-12-08 07:48:26 -08:00
RCTPicker.m Added support for styling the PickerIOS 2015-12-08 07:48:26 -08:00
RCTPickerManager.h
RCTPickerManager.m Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTPointerEvents.h
RCTProgressViewManager.h
RCTProgressViewManager.m Replaced RCTSparseArray with NSDictionary 2015-11-14 10:28:28 -08:00
RCTRefreshControl.h Cross platform PullToRefreshView component 2016-01-04 08:00:29 -08:00
RCTRefreshControl.m Fix RefreshControl layout on screen rotation and consecutive pull to refresh not working properly 2016-03-08 04:00:34 -08:00
RCTRefreshControlManager.h Cross platform PullToRefreshView component 2016-01-04 08:00:29 -08:00
RCTRefreshControlManager.m Cross platform PullToRefreshView component 2016-01-04 08:00:29 -08:00
RCTScrollView.h UIRefreshControl added to scroll view 2015-11-19 11:15:48 -08:00
RCTScrollView.m Fix RefreshControl layout on screen rotation and consecutive pull to refresh not working properly 2016-03-08 04:00:34 -08:00
RCTScrollViewManager.h Remove scrollview support from UIManager, remove mainScrollView(delegate) 2015-11-25 04:12:34 -08:00
RCTScrollViewManager.m Fixed ScrollView.scrollTo() on iOS 2016-02-01 11:05:36 -08:00
RCTScrollableProtocol.h Remove scrollview support from UIManager, remove mainScrollView(delegate) 2015-11-25 04:12:34 -08:00
RCTSegmentedControl.h
RCTSegmentedControl.m
RCTSegmentedControlManager.h
RCTSegmentedControlManager.m Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTShadowView.h Add suggested ‘view size’ powers to -[RCTShadowView setFrame:] 2016-03-01 10:14:32 -08:00
RCTShadowView.m Add suggested ‘view size’ powers to -[RCTShadowView setFrame:] 2016-03-01 10:14:32 -08:00
RCTSlider.h Add option for both min/max track image. 2015-12-21 10:30:39 -08:00
RCTSlider.m Add option for both min/max track image. 2015-12-21 10:30:39 -08:00
RCTSliderManager.h
RCTSliderManager.m Add option for both min/max track image. 2015-12-21 10:30:39 -08:00
RCTSwitch.h
RCTSwitch.m
RCTSwitchManager.h
RCTSwitchManager.m
RCTTabBar.h
RCTTabBar.m fix the memory leaks caused by RCTTabBar 2015-11-05 09:39:30 -08:00
RCTTabBarItem.h Added RCTImageSource 2015-12-08 03:32:30 -08:00
RCTTabBarItem.m Added RCTImageSource 2015-12-08 03:32:30 -08:00
RCTTabBarItemManager.h
RCTTabBarItemManager.m Added RCTImageSource 2015-12-08 03:32:30 -08:00
RCTTabBarManager.h
RCTTabBarManager.m
RCTTextDecorationLineType.h
RCTView.h Add hitSlop prop on iOS and Android 2016-02-16 16:51:39 -08:00
RCTView.m Add hitSlop prop on iOS and Android 2016-02-16 16:51:39 -08:00
RCTViewControllerProtocol.h
RCTViewManager.h removed `viewWithProps:` from `RCTViewManager` 2015-12-21 10:18:47 -08:00
RCTViewManager.m Initialize bridge on a background queue 2016-03-07 09:31:26 -08:00
RCTWebView.h Fix WebView example on iOS 2016-02-26 08:20:34 -08:00
RCTWebView.m Fix WebView example on iOS 2016-02-26 08:20:34 -08:00
RCTWebViewManager.h
RCTWebViewManager.m Fix WebView example on iOS 2016-02-26 08:20:34 -08:00
RCTWrapperViewController.h
RCTWrapperViewController.m
UIView+Private.h
UIView+React.h Replaced RCTSparseArray with NSDictionary 2015-11-14 10:28:28 -08:00
UIView+React.m PixelRatio.pixel() 2016-01-15 05:15:31 -08:00