react-native/Libraries
Adam Miskiewicz 6e28b39d78 Add 'contentInsetAdjustmentBehavior' (new in iOS 11) to ScrollView
Summary:
In iOS11, Apple added a new layout feature called "Safe Areas" (this blog post talks a bit about it: https://www.bignerdranch.com/blog/wwdc-2017-large-titles-and-safe-area-layout-guides/).

UIScrollView is one component that is affected by this change in Apple's API. When the `contentInsetAdjustmentBehavior` is set to `automatic`, for example, it will adjust the insets (and override any manually set insets) automatically based on whether or not there's a UINavigationBar, a UITabBar, a visible status bar, etc on the screen. Frustratingly, Apple decided to default to `Automatic` for this behavior, which will cause any apps that set contentInset/contentContainerStyle padding to have their values offset by, at the very least, the size of the status bar, when they compile their app for iOS 11. Here's more information about this behavior: https://developer.apple.com/documentation/uikit/uiscrollview/2902261-contentinsetadjustmentbehavior?language=objc

Mostly, this is a really straightforward change -- it simply adds a new iOS-only prop to ScrollView that allows setting `contentInsetAdjustmentBehavior`. But I did decide to default the behavior to `never`, so that it mimics the behavior we've seen in iOS < 11. I think it's good to keep something as crucial as scrollview content insets non-magical, and also keep it behaving similarly between platforms.
Closes https://github.com/facebook/react-native/pull/15023

Differential Revision: D5441491

Pulled By: shergin

fbshipit-source-id: 7b56ea290f7f6eca5f1d996ff8488f40b866c2e6
2017-07-25 10:28:42 -07:00
..
ART Avoid creating a new Path instance for performance 2017-07-11 11:18:56 -07:00
ActionSheetIOS Enable -Wimplicit-retain-self en sync warning config for all projects 2017-03-23 15:01:34 -07:00
AdSupport Update AdSupportIOS.js 2017-04-28 06:34:21 -07:00
Alert Export Alert's type ButtonsArray for external use 2017-03-06 12:44:47 -08:00
Animated Native Animated - Override __makeNative in AnimatedInterpolation 2017-07-18 18:02:22 -07:00
AppState Added stubs for some native modules 2017-06-01 08:31:19 -07:00
BatchedBridge Increase information logged to MessageQueue.spy 2017-07-25 08:01:28 -07:00
BugReporting Patch up for future React Sync 2017-02-08 14:50:43 -08:00
CameraRoll Mark non-extern strings static 2017-07-25 04:49:46 -07:00
Components Add 'contentInsetAdjustmentBehavior' (new in iOS 11) to ScrollView 2017-07-25 10:28:42 -07:00
Core gets Relay/Classic/Compat building 2017-07-24 21:39:00 -07:00
EventEmitter Breaking - make RCTDeviceEventEmitter warnings fatal 2017-07-24 03:47:59 -07:00
Experimental Support for preventing swipe left or swipe right 2017-07-07 20:03:20 -07:00
Geolocation Use Apple's significant-change API (for iOS 11 UX) 2017-07-24 11:23:10 -07:00
Image Fix photo orientation from ImagePickerIOS 2017-07-24 21:51:51 -07:00
Inspector Use fixed point in inspector 2017-07-06 14:52:28 -07:00
Interaction Increase information logged to MessageQueue.spy 2017-07-25 08:01:28 -07:00
JSInspector Add Network agent 2016-11-02 12:29:15 -07:00
LayoutAnimation Fix prop-types warning in LayoutAnimation 2017-05-12 15:06:17 -07:00
Linking Add newly recommended method for RCTLinkingManager due to deprecation 2017-05-25 11:31:23 -07:00
LinkingIOS Mark non-extern strings static 2017-07-25 04:49:46 -07:00
Lists Improve the documentation for ListView and ListViewDataSource 2017-07-21 14:31:17 -07:00
Modal iOS `presentationStyle` Modal Appearance 2017-06-20 19:22:57 -07:00
NativeAnimation Stop native driver animations when value is set. 2017-07-20 14:20:30 -07:00
Network DEPRECATION: Make NetInfo API cross platform and expose whether connection is 2g/3g/4g 2017-07-24 15:50:53 -07:00
Performance Cleanup ifdef's in JSCExecutor 2017-07-25 05:02:03 -07:00
PermissionsAndroid Include Create React Native App in Getting Started 2017-04-26 07:16:18 -07:00
PushNotificationIOS Mark non-extern strings static 2017-07-25 04:49:46 -07:00
RCTTest Replace exported method registration with statically allocated struct 2017-07-24 07:01:53 -07:00
ReactNative Support native ViewManager inheritance on iOS 2017-07-10 16:01:12 -07:00
Renderer React sync for revisions cb32253...5495e49 2017-07-13 17:38:57 -07:00
Sample Fix missing RCTBridgeModule.h 2017-01-31 11:13:50 -08:00
Settings Enable -Wimplicit-retain-self en sync warning config for all projects 2017-03-23 15:01:34 -07:00
Share Flowify Process Color 2017-04-26 11:31:56 -07:00
Storage correctly order ASyncStorage 2017-02-21 15:18:40 -08:00
StyleSheet Enable flow for TouchableHighlight 2017-07-12 04:15:41 -07:00
Text Mark non-extern strings static 2017-07-25 04:49:46 -07:00
Utilities gets Relay/Classic/Compat building 2017-07-24 21:39:00 -07:00
Vibration Enable -Wimplicit-retain-self en sync warning config for all projects 2017-03-23 15:01:34 -07:00
WebSocket Make startup errors in the websocket executor invalidate the bridge 2017-06-22 08:37:13 -07:00
polyfills Remove default polyfills from metro-bundler 2017-07-17 03:20:02 -07:00
react-native MaskedViewIOS -- A way to apply alpha masks to views on iOS 2017-07-11 15:05:57 -07:00
vendor gets Relay/Classic/Compat building 2017-07-24 21:39:00 -07:00
Promise.js Don't require prettyFormat in every single bundle. 2017-06-16 04:31:56 -07:00
promiseRejectionIsError.js RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00