mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
3ed8c074e7
Deploy website version based on 7529d09f2e
657 lines
80 KiB
HTML
657 lines
80 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>ScrollView · React Native</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Component that wraps platform ScrollView while providing integration with touch locking "responder" system."/><meta name="docsearch:version" content="0.48"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="ScrollView · React Native"/><meta property="og:type" content="website"/><meta property="og:url" content="https://facebook.github.io/react-native/index.html"/><meta property="og:description" content="Component that wraps platform ScrollView while providing integration with touch locking "responder" system."/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/react-native/img/favicon.png"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/solarized-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://facebook.github.io/react-native/blog/atom.xml" title="React Native Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://facebook.github.io/react-native/blog/feed.xml" title="React Native Blog RSS Feed"/><script>
|
||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||
|
||
ga('create', 'UA-41298772-2', 'auto');
|
||
ga('send', 'pageview');
|
||
</script><script type="text/javascript" src="https://snack.expo.io/embed.js"></script><script type="text/javascript" src="/react-native/js/codeblocks.js"></script><link rel="stylesheet" href="/react-native/css/main.css"/></head><body class="sideNavVisible"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/react-native/"><img class="logo" src="/react-native/img/header_logo.png" alt="React Native"/><h2 class="headerTitleWithLogo">React Native</h2></a><a href="/react-native/versions"><h3>0.48</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/react-native/docs/0.48/getting-started" target="_self">Docs</a></li><li class=""><a href="/react-native/en/help" target="_self">Community</a></li><li class=""><a href="/react-native/blog" target="_self">Blog</a></li><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li><li class=""><a href="https://github.com/facebook/react-native" target="_self">GitHub</a></li><li class=""><a href="https://reactjs.org/" target="_self">React</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i>›</i><span>Components</span></h2></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">The Basics</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/getting-started">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/tutorial">Learn the Basics</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/props">Props</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/state">State</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/style">Style</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/height-and-width">Height and Width</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/flexbox">Layout with Flexbox</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/handling-text-input">Handling Text Input</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/handling-touches">Handling Touches</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/using-a-scrollview">Using a ScrollView</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/using-a-listview">Using List Views</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/network">Networking</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/more-resources">More Resources</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Guides</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/components-and-apis">Components and APIs</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/platform-specific-code">Platform Specific Code</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/navigation">Navigating Between Screens</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/images">Images</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/animations">Animations</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/accessibility">Accessibility</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/improvingux">Improving User Experience</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/timers">Timers</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/debugging">Debugging</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/performance">Performance</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/gesture-responder-system">Gesture Responder System</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/javascript-environment">JavaScript Environment</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/direct-manipulation">Direct Manipulation</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/colors">Color Reference</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/integration-with-existing-apps">Integration with Existing Apps</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/running-on-device">Running On Device</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/upgrading">Upgrading to new React Native versions</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/troubleshooting">Troubleshooting</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Guides (iOS)</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/native-modules-ios">Native Modules</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/native-components-ios">Native UI Components</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/linking-libraries-ios">Linking Libraries</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/running-on-simulator-ios">Running On Simulator</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/communication-ios">Communication between native and React Native</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/building-for-apple-tv">Building For TV Devices</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/app-extensions">App Extensions</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Guides (Android)</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/native-modules-android">Native Modules</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/native-components-android">Native UI Components</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/headless-js-android">Headless JS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/signed-apk-android">Generating Signed APK</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/removing-default-permissions">Removing Default Permissions</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Contributing</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/contributing">How to Contribute</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/maintainers">What to Expect from Maintainers</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/building-from-source">Building React Native from source</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/testing">Testing your Changes</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/understanding-cli">Understanding the CLI</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Components</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/activityindicator">ActivityIndicator</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/button">Button</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/datepickerios">DatePickerIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/drawerlayoutandroid">DrawerLayoutAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/flatlist">FlatList</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/image">Image</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/keyboardavoidingview">KeyboardAvoidingView</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/listview">ListView</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/maskedviewios">MaskedViewIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/modal">Modal</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/navigatorios">NavigatorIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/picker">Picker</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/pickerios">PickerIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/progressbarandroid">ProgressBarAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/progressviewios">ProgressViewIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/refreshcontrol">RefreshControl</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/react-native/docs/0.48/scrollview">ScrollView</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/sectionlist">SectionList</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/segmentedcontrolios">SegmentedControlIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/slider">Slider</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/snapshotviewios">SnapshotViewIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/statusbar">StatusBar</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/switch">Switch</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/tabbarios">TabBarIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/tabbarios-item">TabBarIOS.Item</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/text">Text</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/textinput">TextInput</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/toolbarandroid">ToolbarAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/touchablehighlight">TouchableHighlight</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/touchablenativefeedback">TouchableNativeFeedback</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/touchableopacity">TouchableOpacity</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/touchablewithoutfeedback">TouchableWithoutFeedback</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/view">View</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/viewpagerandroid">ViewPagerAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/virtualizedlist">VirtualizedList</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/webview">WebView</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">APIs</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/accessibilityinfo">AccessibilityInfo</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/actionsheetios">ActionSheetIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/alert">Alert</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/alertios">AlertIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/animated">Animated</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/appregistry">AppRegistry</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/appstate">AppState</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/asyncstorage">AsyncStorage</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/backandroid">BackAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/backhandler">BackHandler</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/cameraroll">CameraRoll</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/clipboard">Clipboard</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/datepickerandroid">DatePickerAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/dimensions">Dimensions</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/easing">Easing</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/geolocation">Geolocation</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/imageeditor">ImageEditor</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/imagepickerios">ImagePickerIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/imagestore">ImageStore</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/image-style-props">Image Style Props</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/interactionmanager">InteractionManager</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/keyboard">Keyboard</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/layout-props">Layout Props</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/layoutanimation">LayoutAnimation</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/linking">Linking</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/listviewdatasource">ListViewDataSource</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/netinfo">NetInfo</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/panresponder">PanResponder</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/permissionsandroid">PermissionsAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/pixelratio">PixelRatio</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/pushnotificationios">PushNotificationIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/settings">Settings</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/shadow-props">Shadow Props</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/share">Share</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/statusbarios">StatusBarIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/stylesheet">StyleSheet</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/systrace">Systrace</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/text-style-props">Text Style Props</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/timepickerandroid">TimePickerAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/toastandroid">ToastAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/transforms">Transforms</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/vibration">Vibration</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/vibrationios">VibrationIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/0.48/view-style-props">View Style Props</a></li></ul></div></div></section></div><script>
|
||
document.addEventListener('DOMContentLoaded', function() {
|
||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||
createToggler('#tocToggler', 'body', 'tocActive');
|
||
|
||
const headings = document.querySelector('.toc-headings');
|
||
headings && headings.addEventListener('click', function(event) {
|
||
if (event.target.tagName === 'A') {
|
||
document.body.classList.remove('tocActive');
|
||
}
|
||
}, false);
|
||
|
||
function createToggler(togglerSelector, targetSelector, className) {
|
||
var toggler = document.querySelector(togglerSelector);
|
||
var target = document.querySelector(targetSelector);
|
||
|
||
toggler.onclick = function(event) {
|
||
event.preventDefault();
|
||
|
||
target.classList.toggle(className);
|
||
};
|
||
}
|
||
});
|
||
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/facebook/react-native-website/blob/master/docs/scrollview.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">ScrollView</h1></header><article><div><span><p>Component that wraps platform ScrollView while providing integration with touch locking "responder" system.</p>
|
||
<p>Keep in mind that ScrollViews must have a bounded height in order to work, since they contain unbounded-height children into a bounded container (via a scroll interaction). In order to bound the height of a ScrollView, either set the height of the view directly (discouraged) or make sure all parent views have bounded height. Forgetting to transfer <code>{flex: 1}</code> down the view stack can lead to errors here, which the element inspector makes easy to debug.</p>
|
||
<p>Doesn't yet support other contained responders from blocking this scroll view from becoming the responder.</p>
|
||
<p><code><ScrollView></code> vs <a href="/react-native/docs/0.48/flatlist"><code><FlatList></code></a> - which one to use?</p>
|
||
<p><code>ScrollView</code> simply renders all its react child components at once. That makes it very easy to understand and use.</p>
|
||
<p>On the other hand, this has a performance downside. Imagine you have a very long list of items you want to display, maybe several screens worth of content. Creating JS components and native views for everything all at once, much of which may not even be shown, will contribute to slow rendering and increased memory usage.</p>
|
||
<p>This is where <code>FlatList</code> comes into play. <code>FlatList</code> renders items lazily, just when they are about to appear, and removes items that scroll way off screen to save memory and processing time.</p>
|
||
<p><code>FlatList</code> is also handy if you want to render separators between your items, multiple columns, infinite scroll loading, or any number of other features it supports out of the box.</p>
|
||
<h3><a class="anchor" aria-hidden="true" id="props"></a><a href="#props" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Props</h3>
|
||
<ul>
|
||
<li><a href="/react-native/docs/0.48/view#props">View props...</a></li>
|
||
</ul>
|
||
<ul>
|
||
<li><a href="/react-native/docs/0.48/scrollview#alwaysbouncehorizontal"><code>alwaysBounceHorizontal</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#contentcontainerstyle"><code>contentContainerStyle</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#keyboarddismissmode"><code>keyboardDismissMode</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#keyboardshouldpersisttaps"><code>keyboardShouldPersistTaps</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#oncontentsizechange"><code>onContentSizeChange</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#onmomentumscrollbegin"><code>onMomentumScrollBegin</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#onmomentumscrollend"><code>onMomentumScrollEnd</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#onscroll"><code>onScroll</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#pagingenabled"><code>pagingEnabled</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#refreshcontrol"><code>refreshControl</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#removeclippedsubviews"><code>removeClippedSubviews</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#scrollenabled"><code>scrollEnabled</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#showshorizontalscrollindicator"><code>showsHorizontalScrollIndicator</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#showsverticalscrollindicator"><code>showsVerticalScrollIndicator</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#stickyheaderindices"><code>stickyHeaderIndices</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#style"><code>style</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#endfillcolor"><code>endFillColor</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#overscrollmode"><code>overScrollMode</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#scrollperftag"><code>scrollPerfTag</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#deprecated-sendupdatedchildframes"><code>DEPRECATED_sendUpdatedChildFrames</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#horizontal"><code>horizontal</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#alwaysbouncevertical"><code>alwaysBounceVertical</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#automaticallyadjustcontentinsets"><code>automaticallyAdjustContentInsets</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#bounces"><code>bounces</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#bounceszoom"><code>bouncesZoom</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#cancancelcontenttouches"><code>canCancelContentTouches</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#centercontent"><code>centerContent</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#contentinset"><code>contentInset</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#contentinsetadjustmentbehavior"><code>contentInsetAdjustmentBehavior</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#contentoffset"><code>contentOffset</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#decelerationrate"><code>decelerationRate</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#directionallockenabled"><code>directionalLockEnabled</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#indicatorstyle"><code>indicatorStyle</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#maximumzoomscale"><code>maximumZoomScale</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#minimumzoomscale"><code>minimumZoomScale</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#scrolleventthrottle"><code>scrollEventThrottle</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#scrollindicatorinsets"><code>scrollIndicatorInsets</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#scrollstotop"><code>scrollsToTop</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#snaptoalignment"><code>snapToAlignment</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#snaptointerval"><code>snapToInterval</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#zoomscale"><code>zoomScale</code></a></li>
|
||
</ul>
|
||
<h3><a class="anchor" aria-hidden="true" id="methods"></a><a href="#methods" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Methods</h3>
|
||
<ul>
|
||
<li><a href="/react-native/docs/0.48/scrollview#scrollto"><code>scrollTo</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#scrolltoend"><code>scrollToEnd</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#scrollwithoutanimationto"><code>scrollWithoutAnimationTo</code></a></li>
|
||
<li><a href="/react-native/docs/0.48/scrollview#flashscrollindicators"><code>flashScrollIndicators</code></a></li>
|
||
</ul>
|
||
<hr>
|
||
<h1><a class="anchor" aria-hidden="true" id="reference"></a><a href="#reference" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Reference</h1>
|
||
<h2><a class="anchor" aria-hidden="true" id="props-1"></a><a href="#props-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Props</h2>
|
||
<h3><a class="anchor" aria-hidden="true" id="alwaysbouncehorizontal"></a><a href="#alwaysbouncehorizontal" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>alwaysBounceHorizontal</code></h3>
|
||
<p>When true, the scroll view bounces horizontally when it reaches the end even if the content is smaller than the scroll view itself. The default value is true when <code>horizontal={true}</code> and false otherwise.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="contentcontainerstyle"></a><a href="#contentcontainerstyle" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>contentContainerStyle</code></h3>
|
||
<p>These styles will be applied to the scroll view content container which wraps all of the child views. Example:</p>
|
||
<pre><code class="hljs"><span class="hljs-keyword">return</span> (
|
||
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">ScrollView</span> <span class="hljs-attr">contentContainerStyle</span>=<span class="hljs-string">{styles.contentContainer}</span>></span>
|
||
<span class="hljs-tag"></<span class="hljs-name">ScrollView</span>></span></span>
|
||
);
|
||
...
|
||
const styles = StyleSheet.create({
|
||
<span class="hljs-attr">contentContainer</span>: {
|
||
<span class="hljs-attr">paddingVertical</span>: <span class="hljs-number">20</span>
|
||
}
|
||
});
|
||
</code></pre>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>StyleSheetPropType(View Style props)</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="keyboarddismissmode"></a><a href="#keyboarddismissmode" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>keyboardDismissMode</code></h3>
|
||
<p>Determines whether the keyboard gets dismissed in response to a drag.</p>
|
||
<p><em>Cross platform</em></p>
|
||
<ul>
|
||
<li><code>'none'</code> (the default), drags do not dismiss the keyboard.</li>
|
||
<li><code>'on-drag'</code>, the keyboard is dismissed when a drag begins.</li>
|
||
</ul>
|
||
<p><em>iOS Only</em></p>
|
||
<ul>
|
||
<li><code>'interactive'</code>, the keyboard is dismissed interactively with the drag and moves in synchrony with the touch; dragging upwards cancels the dismissal. On android this is not supported and it will have the same behavior as 'none'.</li>
|
||
</ul>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>enum('none', 'on-drag', 'interactive')</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="keyboardshouldpersisttaps"></a><a href="#keyboardshouldpersisttaps" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>keyboardShouldPersistTaps</code></h3>
|
||
<p>Determines when the keyboard should stay visible after a tap.</p>
|
||
<ul>
|
||
<li><code>'never'</code> (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap.</li>
|
||
<li><code>'always'</code>, the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps.</li>
|
||
<li><code>'handled'</code>, the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor).</li>
|
||
<li><code>false</code>, deprecated, use 'never' instead</li>
|
||
<li><code>true</code>, deprecated, use 'always' instead</li>
|
||
</ul>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>enum('always', 'never', 'handled', false, true)</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="oncontentsizechange"></a><a href="#oncontentsizechange" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>onContentSizeChange</code></h3>
|
||
<p>Called when scrollable content view of the ScrollView changes.</p>
|
||
<p>Handler function is passed the content width and content height as parameters: <code>(contentWidth, contentHeight)</code></p>
|
||
<p>It's implemented using onLayout handler attached to the content container which this ScrollView renders.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>function</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="onmomentumscrollbegin"></a><a href="#onmomentumscrollbegin" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>onMomentumScrollBegin</code></h3>
|
||
<p>Called when the momentum scroll starts (scroll which occurs as the ScrollView glides to a stop).</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>function</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="onmomentumscrollend"></a><a href="#onmomentumscrollend" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>onMomentumScrollEnd</code></h3>
|
||
<p>Called when the momentum scroll ends (scroll which occurs as the ScrollView glides to a stop).</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>function</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="onscroll"></a><a href="#onscroll" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>onScroll</code></h3>
|
||
<p>Fires at most once per frame during scrolling. The frequency of the events can be controlled using the <code>scrollEventThrottle</code> prop.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>function</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="pagingenabled"></a><a href="#pagingenabled" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>pagingEnabled</code></h3>
|
||
<p>When true, the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. The default value is false.</p>
|
||
<p>Note: Vertical pagination is not supported on Android.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="refreshcontrol"></a><a href="#refreshcontrol" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>refreshControl</code></h3>
|
||
<p>A RefreshControl component, used to provide pull-to-refresh functionality for the ScrollView. Only works for vertical ScrollViews (<code>horizontal</code> prop must be <code>false</code>).</p>
|
||
<p>See <a href="/react-native/docs/0.48/refreshcontrol">RefreshControl</a>.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>element</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="removeclippedsubviews"></a><a href="#removeclippedsubviews" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>removeClippedSubviews</code></h3>
|
||
<p>Experimental: When true, offscreen child views (whose <code>overflow</code> value is <code>hidden</code>) are removed from their native backing superview when offscreen. This can improve scrolling performance on long lists. The default value is true.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="scrollenabled"></a><a href="#scrollenabled" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>scrollEnabled</code></h3>
|
||
<p>When false, the view cannot be scrolled via touch interaction. The default value is true.</p>
|
||
<p>Note that the view can be always be scrolled by calling <code>scrollTo</code>.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="showshorizontalscrollindicator"></a><a href="#showshorizontalscrollindicator" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>showsHorizontalScrollIndicator</code></h3>
|
||
<p>When true, shows a horizontal scroll indicator. The default value is true.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="showsverticalscrollindicator"></a><a href="#showsverticalscrollindicator" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>showsVerticalScrollIndicator</code></h3>
|
||
<p>When true, shows a vertical scroll indicator. The default value is true.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="stickyheaderindices"></a><a href="#stickyheaderindices" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>stickyHeaderIndices</code></h3>
|
||
<p>An array of child indices determining which children get docked to the top of the screen when scrolling. For example, passing <code>stickyHeaderIndices={[0]}</code> will cause the first child to be fixed to the top of the scroll view. This property is not supported in conjunction with <code>horizontal={true}</code>.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>array of number</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="style"></a><a href="#style" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>style</code></h3>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>style</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<ul>
|
||
<li><p><a href="/react-native/docs/0.48/layout-props#props">Layout Props...</a></p></li>
|
||
<li><p><a href="/react-native/docs/0.48/shadow-props#props">Shadow Props...</a></p></li>
|
||
<li><p><a href="/react-native/docs/0.48/transforms#props">Transforms...</a></p></li>
|
||
<li><p><strong><code>borderRightColor</code></strong>: <a href="/react-native/docs/0.48/colors">color</a></p></li>
|
||
<li><p><strong><code>backfaceVisibility</code></strong>: enum('visible', 'hidden')</p></li>
|
||
<li><p><strong><code>borderBottomColor</code></strong>: <a href="/react-native/docs/0.48/colors">color</a></p></li>
|
||
<li><p><strong><code>borderBottomLeftRadius</code></strong>: number</p></li>
|
||
<li><p><strong><code>borderBottomRightRadius</code></strong>: number</p></li>
|
||
<li><p><strong><code>borderBottomWidth</code></strong>: number</p></li>
|
||
<li><p><strong><code>borderColor</code></strong>: <a href="/react-native/docs/0.48/colors">color</a></p></li>
|
||
<li><p><strong><code>borderLeftColor</code></strong>: <a href="/react-native/docs/0.48/colors">color</a></p></li>
|
||
<li><p><strong><code>borderLeftWidth</code></strong>: number</p></li>
|
||
<li><p><strong><code>borderRadius</code></strong>: number</p></li>
|
||
<li><p><strong><code>backgroundColor</code></strong>: <a href="/react-native/docs/0.48/colors">color</a></p></li>
|
||
<li><p><strong><code>borderRightWidth</code></strong>: number</p></li>
|
||
<li><p><strong><code>borderStyle</code></strong>: enum('solid', 'dotted', 'dashed')</p></li>
|
||
<li><p><strong><code>borderTopColor</code></strong>: <a href="/react-native/docs/0.48/colors">color</a></p></li>
|
||
<li><p><strong><code>borderTopLeftRadius</code></strong>: number</p></li>
|
||
<li><p><strong><code>borderTopRightRadius</code></strong>: number</p></li>
|
||
<li><p><strong><code>borderTopWidth</code></strong>: number</p></li>
|
||
<li><p><strong><code>borderWidth</code></strong>: number</p></li>
|
||
<li><p><strong><code>opacity</code></strong>: number</p></li>
|
||
<li><p><strong><code>elevation</code></strong>: number (<em>Android</em>)</p>
|
||
<p>(Android-only) Sets the elevation of a view, using Android's underlying <a href="https://developer.android.com/training/material/shadows-clipping.html#Elevation">elevation API</a>. This adds a drop shadow to the item and affects z-order for overlapping views. Only supported on Android 5.0+, has no effect on earlier versions.</p></li>
|
||
</ul>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="endfillcolor"></a><a href="#endfillcolor" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>endFillColor</code></h3>
|
||
<p>Sometimes a scrollview takes up more space than its content fills. When this is the case, this prop will fill the rest of the scrollview with a color to avoid setting a background and creating unnecessary overdraw. This is an advanced optimization that is not needed in the general case.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td><a href="/react-native/docs/0.48/colors">color</a></td><td>No</td><td>Android</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="overscrollmode"></a><a href="#overscrollmode" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>overScrollMode</code></h3>
|
||
<p>Used to override default value of overScroll mode.</p>
|
||
<p>Possible values:</p>
|
||
<ul>
|
||
<li><code>'auto'</code> - Default value, allow a user to over-scroll this view only if the content is large enough to meaningfully scroll.</li>
|
||
<li><code>'always'</code> - Always allow a user to over-scroll this view.</li>
|
||
<li><code>'never'</code> - Never allow a user to over-scroll this view.</li>
|
||
</ul>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>enum('auto', 'always', 'never')</td><td>No</td><td>Android</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="scrollperftag"></a><a href="#scrollperftag" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>scrollPerfTag</code></h3>
|
||
<p>Tag used to log scroll performance on this scroll view. Will force momentum events to be turned on (see sendMomentumEvents). This doesn't do anything out of the box and you need to implement a custom native FpsListener for it to be useful.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>string</td><td>No</td><td>Android</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="deprecated-sendupdatedchildframes"></a><a href="#deprecated-sendupdatedchildframes" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>DEPRECATED_sendUpdatedChildFrames</code></h3>
|
||
<p>When true, ScrollView will emit updateChildFrames data in scroll events, otherwise will not compute or emit child frame data. This only exists to support legacy issues, <code>onLayout</code> should be used instead to retrieve frame data. The default value is false.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="horizontal"></a><a href="#horizontal" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>horizontal</code></h3>
|
||
<p>When true, the scroll view's children are arranged horizontally in a row instead of vertically in a column. The default value is false.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="alwaysbouncevertical"></a><a href="#alwaysbouncevertical" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>alwaysBounceVertical</code></h3>
|
||
<p>When true, the scroll view bounces vertically when it reaches the end even if the content is smaller than the scroll view itself. The default value is false when <code>horizontal={true}</code> and true otherwise.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="automaticallyadjustcontentinsets"></a><a href="#automaticallyadjustcontentinsets" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>automaticallyAdjustContentInsets</code></h3>
|
||
<p>Controls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or tab bar/ toolbar. The default value is true.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="bounces"></a><a href="#bounces" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>bounces</code></h3>
|
||
<p>When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction. When false, it disables all bouncing even if the <code>alwaysBounce*</code> props are true. The default value is true.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="bounceszoom"></a><a href="#bounceszoom" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>bouncesZoom</code></h3>
|
||
<p>When true, gestures can drive zoom past min/max and the zoom will animate to the min/max value at gesture end, otherwise the zoom will not exceed the limits.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="cancancelcontenttouches"></a><a href="#cancancelcontenttouches" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>canCancelContentTouches</code></h3>
|
||
<p>When false, once tracking starts, won't try to drag if the touch moves. The default value is true.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="centercontent"></a><a href="#centercontent" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>centerContent</code></h3>
|
||
<p>When true, the scroll view automatically centers the content when the content is smaller than the scroll view bounds; when the content is larger than the scroll view, this property has no effect. The default value is false.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="contentinset"></a><a href="#contentinset" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>contentInset</code></h3>
|
||
<p>The amount by which the scroll view content is inset from the edges of the scroll view. Defaults to <code>{top: 0, left: 0, bottom: 0, right: 0}</code>.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>object: {top: number, left: number, bottom: number, right: number}</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="contentinsetadjustmentbehavior"></a><a href="#contentinsetadjustmentbehavior" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>contentInsetAdjustmentBehavior</code></h3>
|
||
<p>This property specifies how the safe area insets are used to modify the content area of the scroll view. The default value of this property is "never". Available on iOS 11 and later.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>enum('automatic', 'scrollableAxes', 'never', 'always')</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="contentoffset"></a><a href="#contentoffset" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>contentOffset</code></h3>
|
||
<p>Used to manually set the starting scroll offset. The default value is <code>{x: 0, y: 0}</code>.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>PointPropType</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="decelerationrate"></a><a href="#decelerationrate" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>decelerationRate</code></h3>
|
||
<p>A floating-point number that determines how quickly the scroll view decelerates after the user lifts their finger. You may also use string shortcuts <code>"normal"</code> and <code>"fast"</code> which match the underlying iOS settings for <code>UIScrollViewDecelerationRateNormal</code> and <code>UIScrollViewDecelerationRateFast</code> respectively.</p>
|
||
<ul>
|
||
<li><code>'normal'</code>: 0.998 (the default)</li>
|
||
<li><code>'fast'</code>: 0.99</li>
|
||
</ul>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>enum('fast', 'normal'), ,number</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="directionallockenabled"></a><a href="#directionallockenabled" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>directionalLockEnabled</code></h3>
|
||
<p>When true, the ScrollView will try to lock to only vertical or horizontal scrolling while dragging. The default value is false.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="indicatorstyle"></a><a href="#indicatorstyle" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>indicatorStyle</code></h3>
|
||
<p>The style of the scroll indicators.</p>
|
||
<ul>
|
||
<li><code>'default'</code> (the default), same as <code>black</code>.</li>
|
||
<li><code>'black'</code>, scroll indicator is black. This style is good against a light background.</li>
|
||
<li><code>'white'</code>, scroll indicator is white. This style is good against a dark background.</li>
|
||
</ul>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>enum('default', 'black', 'white')</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="maximumzoomscale"></a><a href="#maximumzoomscale" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>maximumZoomScale</code></h3>
|
||
<p>The maximum allowed zoom scale. The default value is 1.0.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>number</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="minimumzoomscale"></a><a href="#minimumzoomscale" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>minimumZoomScale</code></h3>
|
||
<p>The minimum allowed zoom scale. The default value is 1.0.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>number</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="scrolleventthrottle"></a><a href="#scrolleventthrottle" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>scrollEventThrottle</code></h3>
|
||
<p>This controls how often the scroll event will be fired while scrolling (as a time interval in ms). A lower number yields better accuracy for code that is tracking the scroll position, but can lead to scroll performance problems due to the volume of information being send over the bridge. You will not notice a difference between values set between 1-16 as the JS run loop is synced to the screen refresh rate. If you do not need precise scroll position tracking, set this value higher to limit the information being sent across the bridge. The default value is zero, which results in the scroll event being sent only once each time the view is scrolled.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>number</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="scrollindicatorinsets"></a><a href="#scrollindicatorinsets" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>scrollIndicatorInsets</code></h3>
|
||
<p>The amount by which the scroll view indicators are inset from the edges of the scroll view. This should normally be set to the same value as the <code>contentInset</code>. Defaults to <code>{0, 0, 0, 0}</code>.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>object: {top: number, left: number, bottom: number, right: number}</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="scrollstotop"></a><a href="#scrollstotop" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>scrollsToTop</code></h3>
|
||
<p>When true, the scroll view scrolls to top when the status bar is tapped. The default value is true.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>bool</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="snaptoalignment"></a><a href="#snaptoalignment" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>snapToAlignment</code></h3>
|
||
<p>When <code>snapToInterval</code> is set, <code>snapToAlignment</code> will define the relationship of the snapping to the scroll view.</p>
|
||
<ul>
|
||
<li><code>'start'</code> (the default) will align the snap at the left (horizontal) or top (vertical)</li>
|
||
<li><code>'center'</code> will align the snap in the center</li>
|
||
<li><code>'end'</code> will align the snap at the right (horizontal) or bottom (vertical)</li>
|
||
</ul>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>enum('start', 'center', 'end')</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="snaptointerval"></a><a href="#snaptointerval" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>snapToInterval</code></h3>
|
||
<p>When set, causes the scroll view to stop at multiples of the value of <code>snapToInterval</code>. This can be used for paginating through children that have lengths smaller than the scroll view. Typically used in combination with <code>snapToAlignment</code> and <code>decelerationRate="fast"</code>. Overrides less configurable <code>pagingEnabled</code> prop.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>number</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="zoomscale"></a><a href="#zoomscale" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>zoomScale</code></h3>
|
||
<p>The current scale of the scroll view content. The default value is 1.0.</p>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Type</th><th>Required</th><th>Platform</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr><td>number</td><td>No</td><td>iOS</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<h2><a class="anchor" aria-hidden="true" id="methods-1"></a><a href="#methods-1" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Methods</h2>
|
||
<h3><a class="anchor" aria-hidden="true" id="scrollto"></a><a href="#scrollto" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>scrollTo()</code></h3>
|
||
<pre><code class="hljs css languages- javascript">scrollTo(([y]: number), object, ([x]: number), ([animated]: boolean));
|
||
</code></pre>
|
||
<p>Scrolls to a given x, y offset, either immediately or with a smooth animation.</p>
|
||
<p>Example:</p>
|
||
<p><code>scrollTo({x: 0, y: 0, animated: true})</code></p>
|
||
<p>Note: The weird function signature is due to the fact that, for historical reasons, the function also accepts separate arguments as an alternative to the options object. This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.</p>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="scrolltoend"></a><a href="#scrolltoend" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>scrollToEnd()</code></h3>
|
||
<pre><code class="hljs css languages- javascript">scrollToEnd(([options]: object));
|
||
</code></pre>
|
||
<p>If this is a vertical ScrollView scrolls to the bottom. If this is a horizontal ScrollView scrolls to the right.</p>
|
||
<p>Use <code>scrollToEnd({animated: true})</code> for smooth animated scrolling, <code>scrollToEnd({animated: false})</code> for immediate scrolling. If no options are passed, <code>animated</code> defaults to true.</p>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="scrollwithoutanimationto"></a><a href="#scrollwithoutanimationto" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>scrollWithoutAnimationTo()</code></h3>
|
||
<pre><code class="hljs css languages- javascript">scrollWithoutAnimationTo(y, x);
|
||
</code></pre>
|
||
<p>Deprecated, use <code>scrollTo</code> instead.</p>
|
||
<hr>
|
||
<h3><a class="anchor" aria-hidden="true" id="flashscrollindicators"></a><a href="#flashscrollindicators" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>flashScrollIndicators()</code></h3>
|
||
<pre><code class="hljs css languages- javascript">flashScrollIndicators();
|
||
</code></pre>
|
||
<p>Displays the scroll indicators momentarily.</p>
|
||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/react-native/docs/0.48/refreshcontrol">← RefreshControl</a><a class="docs-next button" href="/react-native/docs/0.48/sectionlist">SectionList →</a></div></div></div></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/react-native/" class="nav-home"><img src="/react-native/img/header_logo.png" alt="React Native" width="66" height="58"/></a><div><h5><a href="/react-native/docs/getting-started.html">Docs</a></h5><a href="/react-native/docs/getting-started.html">Getting Started</a><a href="/react-native/docs/tutorial.html">Tutorial</a><a href="/react-native/docs/components-and-apis.html">Components and APIs</a><a href="/react-native/docs/more-resources.html">More Resources</a></div><div><h5><a href="/react-native/help.html">Community</a></h5><a href="/react-native/showcase.html">Who's using React Native?</a><a href="http://stackoverflow.com/questions/tagged/react-native" target="_blank">Stack Overflow</a><a href="https://discuss.reactjs.org" target="_blank">Discussion Forum</a><a href="https://discord.gg/0ZcbPKXt5bZjGY5n">Reactiflux Chat</a></div><div><h5>More</h5><a href="/react-native/blog">Blog</a><a href="https://twitter.com/reactnative" target="_blank">Twitter</a><a href="https://github.com/facebook/react-native" target="_blank">GitHub</a><a href="http://reactjs.org" target="_blank">React</a></div></section><a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource"><img src="/react-native/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright">Copyright © 2018 Facebook Inc.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'1677033832619985',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||
var search = docsearch({
|
||
|
||
apiKey: '2c98749b4a1e588efec53b2acec13025',
|
||
indexName: 'react-native-versions',
|
||
inputSelector: '#search_input_react',
|
||
algoliaOptions: {"facetFilters":["tags:0.48"],"hitsPerPage":5}
|
||
});
|
||
</script></body></html> |