react-native/React/Views
James Reggio 9733b92f3d Add `onScrollToTop` to ScrollView for iOS (#21204)
Summary:
This PR exposes the `onScrollToTop` event on iOS using the same event-forwarding infrastructure as other ScrollView events. (As such, its `nativeEvent` object reflects the same fields as other ScrollView events.)

Motivation:
----------

If your app is only interested in knowing the position of a ScrollView after a scroll has completed, it can use `onScrollEndDrag` and `onMomentumScrollEnd` to inspect the `contentOffset` after a drag-initiated scroll has finished. (This is much less expensive than observing the `onScroll` event if you only want to know the end position.) However, neither of these `End` events fire if the ScrollView is scrolled to the top by tapping the status bar.

By exposing `onScrollToTop`, it is now possible for an app to cheaply know when such a scroll has completed.
Pull Request resolved: https://github.com/facebook/react-native/pull/21204

Differential Revision: D9943618

Pulled By: hramos

fbshipit-source-id: ac5ee42b7f12d94655ffda617f8f811138da7f6f
2018-09-19 11:17:30 -07:00
..
SafeAreaView SafeAreaView: A new prop `emulateUnlessSupported` that turns off the custom implementation of `safeAreaInsets` insets 2018-09-11 21:19:18 -07:00
ScrollView Add `onScrollToTop` to ScrollView for iOS (#21204) 2018-09-19 11:17:30 -07:00
RCTActivityIndicatorView.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTActivityIndicatorView.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTActivityIndicatorViewManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTActivityIndicatorViewManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTAnimationType.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTAutoInsetsProtocol.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTBorderDrawing.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTBorderDrawing.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTBorderStyle.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTComponent.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTComponentData.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTComponentData.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTConvert+CoreLocation.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTConvert+CoreLocation.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTConvert+Transform.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTConvert+Transform.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTDatePicker.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTDatePicker.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTDatePickerManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTDatePickerManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTFont.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTFont.mm Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTLayout.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTLayout.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTMaskedView.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTMaskedView.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTMaskedViewManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTMaskedViewManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTModalHostView.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTModalHostView.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTModalHostViewController.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTModalHostViewController.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTModalHostViewManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTModalHostViewManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTModalManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTModalManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTPicker.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTPicker.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTPickerManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTPickerManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTPointerEvents.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTProgressViewManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTProgressViewManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRefreshControl.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRefreshControl.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRefreshControlManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRefreshControlManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRootShadowView.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRootShadowView.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTSegmentedControl.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTSegmentedControl.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTSegmentedControlManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTSegmentedControlManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTShadowView+Internal.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTShadowView+Internal.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTShadowView+Layout.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTShadowView+Layout.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTShadowView.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTShadowView.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTSlider.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTSlider.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTSliderManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTSliderManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTSwitch.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTSwitch.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTSwitchManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTSwitchManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTVView.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTVView.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTabBar.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTabBar.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTabBarItem.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTabBarItem.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTabBarItemManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTabBarItemManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTabBarManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTabBarManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTextDecorationLineType.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTView.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTView.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTViewManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTViewManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTWKWebView.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTWKWebView.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTWKWebViewManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTWKWebViewManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTWebView.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTWebView.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTWebViewManager.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTWebViewManager.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTWrapperViewController.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTWrapperViewController.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
UIView+Private.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
UIView+React.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
UIView+React.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00