mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Deploy website
Deploy website version based on fa10dcebb156e09b73639dcfec35bbbfcaab14ad
This commit is contained in:
@@ -553,7 +553,7 @@ class MultiSelectList extends React.PureComponent {
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -553,7 +553,7 @@ class MultiSelectList extends React.PureComponent {
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -553,7 +553,7 @@ class MultiSelectList extends React.PureComponent {
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -553,7 +553,7 @@ class MultiSelectList extends React.PureComponent {
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -553,7 +553,7 @@ class MultiSelectList extends React.PureComponent {
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -553,7 +553,7 @@ class MultiSelectList extends React.PureComponent {
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -589,7 +589,7 @@ class MultiSelectList extends React.PureComponent {
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -589,7 +589,7 @@ class MultiSelectList extends React.PureComponent {
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -589,7 +589,7 @@ class MultiSelectList extends React.PureComponent {
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -589,7 +589,7 @@ class MultiSelectList extends React.PureComponent {
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -589,7 +589,7 @@ class MultiSelectList extends React.PureComponent {
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -589,7 +589,7 @@ class MultiSelectList extends React.PureComponent {
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
<p>If you are targeting devices running iOS 11 or later, you will also need to add the <code>NSPhotoLibraryAddUsageDescription</code> key in your <code>Info.plist</code>. Use this key to define a string that describes how your app will use this data. By adding this key to your <code>Info.plist</code>, you will be able to request write-only access permission from the user. If you try to save to the camera roll without this permission, your app will exit.</p>
|
||||
<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="cameraroll.md#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="cameraroll.md#getphotos"><code>getPhotos</code></a></li>
|
||||
<li><a href="#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="#getphotos"><code>getPhotos</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>
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
<p>If you are targeting devices running iOS 11 or later, you will also need to add the <code>NSPhotoLibraryAddUsageDescription</code> key in your <code>Info.plist</code>. Use this key to define a string that describes how your app will use this data. By adding this key to your <code>Info.plist</code>, you will be able to request write-only access permission from the user. If you try to save to the camera roll without this permission, your app will exit.</p>
|
||||
<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="cameraroll.md#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="cameraroll.md#getphotos"><code>getPhotos</code></a></li>
|
||||
<li><a href="#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="#getphotos"><code>getPhotos</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>
|
||||
|
||||
@@ -587,7 +587,7 @@
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -587,7 +587,7 @@
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer docsContainer"><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/listview.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 id="__docusaurus" class="postHeaderTitle">ListView</h1></header><article><div><span><p>DEPRECATED - use one of the new list components, such as <a href="/react-native/docs/0.58/flatlist"><code>FlatList</code></a> or <a href="/react-native/docs/0.58/sectionlist"><code>SectionList</code></a> for bounded memory use, fewer bugs, better performance, an easier to use API, and more features. Check out this <a href="https://facebook.github.io/react-native/blog/2017/03/13/better-list-views">blog post</a> for more details.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="listviewdatasource.md"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="https://facebook.github.io/react-native/docs/listviewdatasource.html"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>Minimal example:</p>
|
||||
<pre><code class="hljs css language-jsx"><span class="token keyword">class</span> <span class="token class-name">MyComponent</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>
|
||||
<span class="token function">constructor</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer docsContainer"><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/listview.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 id="__docusaurus" class="postHeaderTitle">ListView</h1></header><article><div><span><p>DEPRECATED - use one of the new list components, such as <a href="/react-native/docs/0.58/flatlist"><code>FlatList</code></a> or <a href="/react-native/docs/0.58/sectionlist"><code>SectionList</code></a> for bounded memory use, fewer bugs, better performance, an easier to use API, and more features. Check out this <a href="https://facebook.github.io/react-native/blog/2017/03/13/better-list-views">blog post</a> for more details.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="listviewdatasource.md"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="https://facebook.github.io/react-native/docs/listviewdatasource.html"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>Minimal example:</p>
|
||||
<pre><code class="hljs css language-jsx"><span class="token keyword">class</span> <span class="token class-name">MyComponent</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>
|
||||
<span class="token function">constructor</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
<p>If you are targeting devices running iOS 11 or later, you will also need to add the <code>NSPhotoLibraryAddUsageDescription</code> key in your <code>Info.plist</code>. Use this key to define a string that describes how your app will use this data. By adding this key to your <code>Info.plist</code>, you will be able to request write-only access permission from the user. If you try to save to the camera roll without this permission, your app will exit.</p>
|
||||
<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="cameraroll.md#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="cameraroll.md#getphotos"><code>getPhotos</code></a></li>
|
||||
<li><a href="#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="#getphotos"><code>getPhotos</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>
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
<p>If you are targeting devices running iOS 11 or later, you will also need to add the <code>NSPhotoLibraryAddUsageDescription</code> key in your <code>Info.plist</code>. Use this key to define a string that describes how your app will use this data. By adding this key to your <code>Info.plist</code>, you will be able to request write-only access permission from the user. If you try to save to the camera roll without this permission, your app will exit.</p>
|
||||
<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="cameraroll.md#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="cameraroll.md#getphotos"><code>getPhotos</code></a></li>
|
||||
<li><a href="#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="#getphotos"><code>getPhotos</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>
|
||||
|
||||
@@ -587,7 +587,7 @@
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -587,7 +587,7 @@
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer docsContainer"><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/listview.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 id="__docusaurus" class="postHeaderTitle">ListView</h1></header><article><div><span><p>DEPRECATED - use one of the new list components, such as <a href="/react-native/docs/0.59/flatlist"><code>FlatList</code></a> or <a href="/react-native/docs/0.59/sectionlist"><code>SectionList</code></a> for bounded memory use, fewer bugs, better performance, an easier to use API, and more features. Check out this <a href="https://facebook.github.io/react-native/blog/2017/03/13/better-list-views">blog post</a> for more details.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="listviewdatasource.md"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="https://facebook.github.io/react-native/docs/listviewdatasource.html"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>Minimal example:</p>
|
||||
<pre><code class="hljs css language-jsx"><span class="token keyword">class</span> <span class="token class-name">MyComponent</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>
|
||||
<span class="token function">constructor</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer docsContainer"><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/listview.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 id="__docusaurus" class="postHeaderTitle">ListView</h1></header><article><div><span><p>DEPRECATED - use one of the new list components, such as <a href="/react-native/docs/0.59/flatlist"><code>FlatList</code></a> or <a href="/react-native/docs/0.59/sectionlist"><code>SectionList</code></a> for bounded memory use, fewer bugs, better performance, an easier to use API, and more features. Check out this <a href="https://facebook.github.io/react-native/blog/2017/03/13/better-list-views">blog post</a> for more details.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="listviewdatasource.md"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="https://facebook.github.io/react-native/docs/listviewdatasource.html"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>Minimal example:</p>
|
||||
<pre><code class="hljs css language-jsx"><span class="token keyword">class</span> <span class="token class-name">MyComponent</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>
|
||||
<span class="token function">constructor</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<p>If you are targeting devices running iOS 11 or later, you will also need to add the <code>NSPhotoLibraryAddUsageDescription</code> key in your <code>Info.plist</code>. Use this key to define a string that describes how your app will use this data. By adding this key to your <code>Info.plist</code>, you will be able to request write-only access permission from the user. If you try to save to the camera roll without this permission, your app will exit.</p>
|
||||
<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="cameraroll.md#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="cameraroll.md#getphotos"><code>getPhotos</code></a></li>
|
||||
<li><a href="#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="#getphotos"><code>getPhotos</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>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<p>If you are targeting devices running iOS 11 or later, you will also need to add the <code>NSPhotoLibraryAddUsageDescription</code> key in your <code>Info.plist</code>. Use this key to define a string that describes how your app will use this data. By adding this key to your <code>Info.plist</code>, you will be able to request write-only access permission from the user. If you try to save to the camera roll without this permission, your app will exit.</p>
|
||||
<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="cameraroll.md#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="cameraroll.md#getphotos"><code>getPhotos</code></a></li>
|
||||
<li><a href="#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="#getphotos"><code>getPhotos</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>
|
||||
|
||||
@@ -697,7 +697,7 @@ const styles = StyleSheet.create({
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -697,7 +697,7 @@ const styles = StyleSheet.create({
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
)
|
||||
});
|
||||
</script><script src="/react-native/js/scrollSpy.js"></script><link rel="stylesheet" href="/react-native/css/prism.css"/><link rel="stylesheet" href="/react-native/css/main.css"/><script src="/react-native/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/react-native/"><img class="logo" src="/react-native/img/header_logo.svg" alt="React Native"/><h2 class="headerTitleWithLogo">React Native</h2></a><a href="/react-native/versions"><h3>0.60</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/react-native/docs/0.60/getting-started" target="_self">Docs</a></li><li class=""><a href="/react-native/docs/0.60/activityindicator" target="_self">API</a></li><li class=""><a href="/react-native/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></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container mainContainer docsContainer"><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/listview.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 id="__docusaurus" class="postHeaderTitle">ListView</h1></header><article><div><span><p>DEPRECATED - use one of the new list components, such as <a href="/react-native/docs/0.60/flatlist"><code>FlatList</code></a> or <a href="/react-native/docs/0.60/sectionlist"><code>SectionList</code></a> for bounded memory use, fewer bugs, better performance, an easier to use API, and more features. Check out this <a href="https://facebook.github.io/react-native/blog/2017/03/13/better-list-views">blog post</a> for more details.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="listviewdatasource.md"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="https://facebook.github.io/react-native/docs/listviewdatasource.html"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>Minimal example:</p>
|
||||
<pre><code class="hljs css language-jsx"><span class="token keyword">class</span> <span class="token class-name">MyComponent</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>
|
||||
<span class="token function">constructor</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
)
|
||||
});
|
||||
</script><script src="/react-native/js/scrollSpy.js"></script><link rel="stylesheet" href="/react-native/css/prism.css"/><link rel="stylesheet" href="/react-native/css/main.css"/><script src="/react-native/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/react-native/"><img class="logo" src="/react-native/img/header_logo.svg" alt="React Native"/><h2 class="headerTitleWithLogo">React Native</h2></a><a href="/react-native/versions"><h3>0.60</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/react-native/docs/0.60/getting-started" target="_self">Docs</a></li><li class=""><a href="/react-native/docs/0.60/activityindicator" target="_self">API</a></li><li class=""><a href="/react-native/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></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container mainContainer docsContainer"><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/listview.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 id="__docusaurus" class="postHeaderTitle">ListView</h1></header><article><div><span><p>DEPRECATED - use one of the new list components, such as <a href="/react-native/docs/0.60/flatlist"><code>FlatList</code></a> or <a href="/react-native/docs/0.60/sectionlist"><code>SectionList</code></a> for bounded memory use, fewer bugs, better performance, an easier to use API, and more features. Check out this <a href="https://facebook.github.io/react-native/blog/2017/03/13/better-list-views">blog post</a> for more details.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="listviewdatasource.md"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="https://facebook.github.io/react-native/docs/listviewdatasource.html"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>Minimal example:</p>
|
||||
<pre><code class="hljs css language-jsx"><span class="token keyword">class</span> <span class="token class-name">MyComponent</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>
|
||||
<span class="token function">constructor</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<p>If you are targeting devices running iOS 11 or later, you will also need to add the <code>NSPhotoLibraryAddUsageDescription</code> key in your <code>Info.plist</code>. Use this key to define a string that describes how your app will use this data. By adding this key to your <code>Info.plist</code>, you will be able to request write-only access permission from the user. If you try to save to the camera roll without this permission, your app will exit.</p>
|
||||
<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="cameraroll.md#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="cameraroll.md#getphotos"><code>getPhotos</code></a></li>
|
||||
<li><a href="#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="#getphotos"><code>getPhotos</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>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<p>If you are targeting devices running iOS 11 or later, you will also need to add the <code>NSPhotoLibraryAddUsageDescription</code> key in your <code>Info.plist</code>. Use this key to define a string that describes how your app will use this data. By adding this key to your <code>Info.plist</code>, you will be able to request write-only access permission from the user. If you try to save to the camera roll without this permission, your app will exit.</p>
|
||||
<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="cameraroll.md#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="cameraroll.md#getphotos"><code>getPhotos</code></a></li>
|
||||
<li><a href="#savetocameraroll"><code>saveToCameraRoll</code></a></li>
|
||||
<li><a href="#getphotos"><code>getPhotos</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>
|
||||
|
||||
+1
-1
@@ -697,7 +697,7 @@ const styles = StyleSheet.create({
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -697,7 +697,7 @@ const styles = StyleSheet.create({
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
)
|
||||
});
|
||||
</script><script src="/react-native/js/scrollSpy.js"></script><link rel="stylesheet" href="/react-native/css/prism.css"/><link rel="stylesheet" href="/react-native/css/main.css"/><script src="/react-native/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/react-native/"><img class="logo" src="/react-native/img/header_logo.svg" alt="React Native"/><h2 class="headerTitleWithLogo">React Native</h2></a><a href="/react-native/versions"><h3>0.61</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/react-native/docs/getting-started" target="_self">Docs</a></li><li class=""><a href="/react-native/docs/activityindicator" target="_self">API</a></li><li class=""><a href="/react-native/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></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container mainContainer docsContainer"><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/listview.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 id="__docusaurus" class="postHeaderTitle">ListView</h1></header><article><div><span><p>DEPRECATED - use one of the new list components, such as <a href="/react-native/docs/flatlist"><code>FlatList</code></a> or <a href="/react-native/docs/sectionlist"><code>SectionList</code></a> for bounded memory use, fewer bugs, better performance, an easier to use API, and more features. Check out this <a href="https://facebook.github.io/react-native/blog/2017/03/13/better-list-views">blog post</a> for more details.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="listviewdatasource.md"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="https://facebook.github.io/react-native/docs/listviewdatasource.html"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>Minimal example:</p>
|
||||
<pre><code class="hljs css language-jsx"><span class="token keyword">class</span> <span class="token class-name">MyComponent</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>
|
||||
<span class="token function">constructor</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
)
|
||||
});
|
||||
</script><script src="/react-native/js/scrollSpy.js"></script><link rel="stylesheet" href="/react-native/css/prism.css"/><link rel="stylesheet" href="/react-native/css/main.css"/><script src="/react-native/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/react-native/"><img class="logo" src="/react-native/img/header_logo.svg" alt="React Native"/><h2 class="headerTitleWithLogo">React Native</h2></a><a href="/react-native/versions"><h3>0.61</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/react-native/docs/getting-started" target="_self">Docs</a></li><li class=""><a href="/react-native/docs/activityindicator" target="_self">API</a></li><li class=""><a href="/react-native/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></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container mainContainer docsContainer"><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/listview.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 id="__docusaurus" class="postHeaderTitle">ListView</h1></header><article><div><span><p>DEPRECATED - use one of the new list components, such as <a href="/react-native/docs/flatlist"><code>FlatList</code></a> or <a href="/react-native/docs/sectionlist"><code>SectionList</code></a> for bounded memory use, fewer bugs, better performance, an easier to use API, and more features. Check out this <a href="https://facebook.github.io/react-native/blog/2017/03/13/better-list-views">blog post</a> for more details.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="listviewdatasource.md"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a <a href="https://facebook.github.io/react-native/docs/listviewdatasource.html"><code>ListView.DataSource</code></a>, populate it with a flat array of data blobs, and instantiate a <code>ListView</code> component with that data source and a <code>renderRow</code> callback which takes a blob from the data array and returns a renderable component.</p>
|
||||
<p>Minimal example:</p>
|
||||
<pre><code class="hljs css language-jsx"><span class="token keyword">class</span> <span class="token class-name">MyComponent</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>
|
||||
<span class="token function">constructor</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<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="events"></a><a href="#events" 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>Events</h2>
|
||||
<h3><a class="anchor" aria-hidden="true" id="change"></a><a href="#change" 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>change</code></h3>
|
||||
<p>This even is received when the app state has changed. The listener is called with one of <a href="/react-native/docs/next/appstate#app-states">the current app state values</a>.</p>
|
||||
<p>This event is received when the app state has changed. The listener is called with one of <a href="/react-native/docs/next/appstate#app-states">the current app state values</a>.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="focus"></a><a href="#focus" 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>focus</code></h3>
|
||||
<p>[Android only] Received when the app gains focus (the user is interacting with the app).</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="blur"></a><a href="#blur" 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>blur</code></h3>
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<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="events"></a><a href="#events" 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>Events</h2>
|
||||
<h3><a class="anchor" aria-hidden="true" id="change"></a><a href="#change" 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>change</code></h3>
|
||||
<p>This even is received when the app state has changed. The listener is called with one of <a href="/react-native/docs/next/appstate#app-states">the current app state values</a>.</p>
|
||||
<p>This event is received when the app state has changed. The listener is called with one of <a href="/react-native/docs/next/appstate#app-states">the current app state values</a>.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="focus"></a><a href="#focus" 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>focus</code></h3>
|
||||
<p>[Android only] Received when the app gains focus (the user is interacting with the app).</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="blur"></a><a href="#blur" 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>blur</code></h3>
|
||||
|
||||
@@ -698,7 +698,7 @@ const styles = StyleSheet.create({
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
@@ -698,7 +698,7 @@ const styles = StyleSheet.create({
|
||||
<ul>
|
||||
<li>'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to <code>true</code>.</li>
|
||||
<li>'index' (number) - The index to scroll to. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.</li>
|
||||
<li>'viewOffset' (number) - A fixed number of pixels to offset the final target position.</li>
|
||||
<li>'viewPosition' (number) - A value of <code>0</code> places the item specified by index at the top, <code>1</code> at the bottom, and <code>0.5</code> centered in the middle.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
+10
-10
@@ -106,10 +106,10 @@
|
||||
<h3><a class="anchor" aria-hidden="true" id="aspectratio"></a><a href="#aspectratio" 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>aspectRatio</code></h3>
|
||||
<p>Aspect ratio controls the size of the undefined dimension of a node. Aspect ratio is a non-standard property only available in React Native and not CSS.</p>
|
||||
<ul>
|
||||
<li>On a node with a set width/height aspect ratio controls the size of the unset dimension</li>
|
||||
<li>On a node with a set flex basis aspect ratio controls the size of the node in the cross axis if unset</li>
|
||||
<li>On a node with a measure function aspect ratio works as though the measure function measures the flex basis</li>
|
||||
<li>On a node with flex grow/shrink aspect ratio controls the size of the node in the cross axis if unset</li>
|
||||
<li>On a node with a set width/height, aspect ratio controls the size of the unset dimension</li>
|
||||
<li>On a node with a set flex basis, aspect ratio controls the size of the node in the cross axis if unset</li>
|
||||
<li>On a node with a measure function, aspect ratio works as though the measure function measures the flex basis</li>
|
||||
<li>On a node with flex grow/shrink, aspect ratio controls the size of the node in the cross axis if unset</li>
|
||||
<li>Aspect ratio takes min/max dimensions into account</li>
|
||||
</ul>
|
||||
<table>
|
||||
@@ -224,7 +224,7 @@
|
||||
<hr>
|
||||
<h3><a class="anchor" aria-hidden="true" id="display"></a><a href="#display" 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>display</code></h3>
|
||||
<p><code>display</code> sets the display type of this component.</p>
|
||||
<p>It works similarly to <code>display</code> in CSS, but only support 'flex' and 'none'. 'flex' is the default.</p>
|
||||
<p>It works similarly to <code>display</code> in CSS but only supports 'flex' and 'none'. 'flex' is the default.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Type</th><th>Required</th></tr>
|
||||
@@ -248,10 +248,10 @@
|
||||
<hr>
|
||||
<h3><a class="anchor" aria-hidden="true" id="flex"></a><a href="#flex" 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>flex</code></h3>
|
||||
<p>In React Native <code>flex</code> does not work the same way that it does in CSS. <code>flex</code> is a number rather than a string, and it works according to the <a href="https://github.com/facebook/yoga">Yoga</a>.</p>
|
||||
<p>When <code>flex</code> is a positive number, it makes the component flexible and it will be sized proportional to its flex value. So a component with <code>flex</code> set to 2 will take twice the space as a component with <code>flex</code> set to 1. <code>flex: <positive number></code> equates to <code>flexGrow: <positive number>, flexShrink: 1, flexBasis: 0</code>.</p>
|
||||
<p>When <code>flex</code> is 0, the component is sized according to <code>width</code> and <code>height</code> and it is inflexible.</p>
|
||||
<p>When <code>flex</code> is -1, the component is normally sized according <code>width</code> and <code>height</code>. However, if there's not enough space, the component will shrink to its <code>minWidth</code> and <code>minHeight</code>.</p>
|
||||
<p>flexGrow, flexShrink, and flexBasis work the same as in CSS.</p>
|
||||
<p>When <code>flex</code> is a positive number, it makes the component flexible, and it will be sized proportional to its flex value. So a component with <code>flex</code> set to 2 will take twice the space as a component with <code>flex</code> set to 1. <code>flex: <positive number></code> equates to <code>flexGrow: <positive number>, flexShrink: 1, flexBasis: 0</code>.</p>
|
||||
<p>When <code>flex</code> is 0, the component is sized according to <code>width</code> and <code>height</code>, and it is inflexible.</p>
|
||||
<p>When <code>flex</code> is -1, the component is normally sized according to <code>width</code> and <code>height</code>. However, if there's not enough space, the component will shrink to its <code>minWidth</code> and <code>minHeight</code>.</p>
|
||||
<p><code>flexGrow</code>, <code>flexShrink</code>, and <code>flexBasis</code> work the same as in CSS.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Type</th><th>Required</th></tr>
|
||||
@@ -501,7 +501,7 @@
|
||||
</table>
|
||||
<hr>
|
||||
<h3><a class="anchor" aria-hidden="true" id="overflow"></a><a href="#overflow" 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>overflow</code></h3>
|
||||
<p><code>overflow</code> controls how children are measured and displayed. <code>overflow: hidden</code> causes views to be clipped while <code>overflow: scroll</code> causes views to be measured independently of their parents main axis. It works like <code>overflow</code> in CSS (default: visible). See <a href="https://developer.mozilla.org/en/docs/Web/CSS/overflow">https://developer.mozilla.org/en/docs/Web/CSS/overflow</a> for more details.</p>
|
||||
<p><code>overflow</code> controls how children are measured and displayed. <code>overflow: hidden</code> causes views to be clipped while <code>overflow: scroll</code> causes views to be measured independently of their parents' main axis. It works like <code>overflow</code> in CSS (default: visible). See <a href="https://developer.mozilla.org/en/docs/Web/CSS/overflow">https://developer.mozilla.org/en/docs/Web/CSS/overflow</a> for more details.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Type</th><th>Required</th></tr>
|
||||
|
||||
@@ -106,10 +106,10 @@
|
||||
<h3><a class="anchor" aria-hidden="true" id="aspectratio"></a><a href="#aspectratio" 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>aspectRatio</code></h3>
|
||||
<p>Aspect ratio controls the size of the undefined dimension of a node. Aspect ratio is a non-standard property only available in React Native and not CSS.</p>
|
||||
<ul>
|
||||
<li>On a node with a set width/height aspect ratio controls the size of the unset dimension</li>
|
||||
<li>On a node with a set flex basis aspect ratio controls the size of the node in the cross axis if unset</li>
|
||||
<li>On a node with a measure function aspect ratio works as though the measure function measures the flex basis</li>
|
||||
<li>On a node with flex grow/shrink aspect ratio controls the size of the node in the cross axis if unset</li>
|
||||
<li>On a node with a set width/height, aspect ratio controls the size of the unset dimension</li>
|
||||
<li>On a node with a set flex basis, aspect ratio controls the size of the node in the cross axis if unset</li>
|
||||
<li>On a node with a measure function, aspect ratio works as though the measure function measures the flex basis</li>
|
||||
<li>On a node with flex grow/shrink, aspect ratio controls the size of the node in the cross axis if unset</li>
|
||||
<li>Aspect ratio takes min/max dimensions into account</li>
|
||||
</ul>
|
||||
<table>
|
||||
@@ -224,7 +224,7 @@
|
||||
<hr>
|
||||
<h3><a class="anchor" aria-hidden="true" id="display"></a><a href="#display" 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>display</code></h3>
|
||||
<p><code>display</code> sets the display type of this component.</p>
|
||||
<p>It works similarly to <code>display</code> in CSS, but only support 'flex' and 'none'. 'flex' is the default.</p>
|
||||
<p>It works similarly to <code>display</code> in CSS but only supports 'flex' and 'none'. 'flex' is the default.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Type</th><th>Required</th></tr>
|
||||
@@ -248,10 +248,10 @@
|
||||
<hr>
|
||||
<h3><a class="anchor" aria-hidden="true" id="flex"></a><a href="#flex" 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>flex</code></h3>
|
||||
<p>In React Native <code>flex</code> does not work the same way that it does in CSS. <code>flex</code> is a number rather than a string, and it works according to the <a href="https://github.com/facebook/yoga">Yoga</a>.</p>
|
||||
<p>When <code>flex</code> is a positive number, it makes the component flexible and it will be sized proportional to its flex value. So a component with <code>flex</code> set to 2 will take twice the space as a component with <code>flex</code> set to 1. <code>flex: <positive number></code> equates to <code>flexGrow: <positive number>, flexShrink: 1, flexBasis: 0</code>.</p>
|
||||
<p>When <code>flex</code> is 0, the component is sized according to <code>width</code> and <code>height</code> and it is inflexible.</p>
|
||||
<p>When <code>flex</code> is -1, the component is normally sized according <code>width</code> and <code>height</code>. However, if there's not enough space, the component will shrink to its <code>minWidth</code> and <code>minHeight</code>.</p>
|
||||
<p>flexGrow, flexShrink, and flexBasis work the same as in CSS.</p>
|
||||
<p>When <code>flex</code> is a positive number, it makes the component flexible, and it will be sized proportional to its flex value. So a component with <code>flex</code> set to 2 will take twice the space as a component with <code>flex</code> set to 1. <code>flex: <positive number></code> equates to <code>flexGrow: <positive number>, flexShrink: 1, flexBasis: 0</code>.</p>
|
||||
<p>When <code>flex</code> is 0, the component is sized according to <code>width</code> and <code>height</code>, and it is inflexible.</p>
|
||||
<p>When <code>flex</code> is -1, the component is normally sized according to <code>width</code> and <code>height</code>. However, if there's not enough space, the component will shrink to its <code>minWidth</code> and <code>minHeight</code>.</p>
|
||||
<p><code>flexGrow</code>, <code>flexShrink</code>, and <code>flexBasis</code> work the same as in CSS.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Type</th><th>Required</th></tr>
|
||||
@@ -501,7 +501,7 @@
|
||||
</table>
|
||||
<hr>
|
||||
<h3><a class="anchor" aria-hidden="true" id="overflow"></a><a href="#overflow" 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>overflow</code></h3>
|
||||
<p><code>overflow</code> controls how children are measured and displayed. <code>overflow: hidden</code> causes views to be clipped while <code>overflow: scroll</code> causes views to be measured independently of their parents main axis. It works like <code>overflow</code> in CSS (default: visible). See <a href="https://developer.mozilla.org/en/docs/Web/CSS/overflow">https://developer.mozilla.org/en/docs/Web/CSS/overflow</a> for more details.</p>
|
||||
<p><code>overflow</code> controls how children are measured and displayed. <code>overflow: hidden</code> causes views to be clipped while <code>overflow: scroll</code> causes views to be measured independently of their parents' main axis. It works like <code>overflow</code> in CSS (default: visible). See <a href="https://developer.mozilla.org/en/docs/Web/CSS/overflow">https://developer.mozilla.org/en/docs/Web/CSS/overflow</a> for more details.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Type</th><th>Required</th></tr>
|
||||
|
||||
@@ -89,15 +89,11 @@
|
||||
<li><p>CocoaPods:</p>
|
||||
<ul>
|
||||
<li><p>Add the PushNotificationIOS library to your Podfile: ./ios/Podfile</p>
|
||||
<pre><code class="hljs">
|
||||
``
|
||||
<span class="hljs-bullet">..
|
||||
</span>do
|
||||
pp
|
||||
<span class="hljs-bullet">..
|
||||
</span>S'
|
||||
<span class="hljs-bullet">...
|
||||
</span></code></pre></li>
|
||||
<pre><code class="hljs css language-ruby">target <span class="hljs-string">'myAwesomeApp'</span> <span class="hljs-keyword">do</span>
|
||||
<span class="hljs-comment"># Pods for myAwesomeApp</span>
|
||||
pod <span class="hljs-string">'React-RCTPushNotification'</span>, <span class="hljs-symbol">:path</span> => <span class="hljs-string">'../node_modules/react-native/Libraries/PushNotificationIOS'</span>
|
||||
<span class="hljs-keyword">end</span>
|
||||
</code></pre></li>
|
||||
</ul></li>
|
||||
<li><p><a href="/react-native/docs/next/linking-libraries-ios#manual-linking">Manually link</a> the PushNotificationIOS library:</p>
|
||||
<ul>
|
||||
|
||||
@@ -89,15 +89,11 @@
|
||||
<li><p>CocoaPods:</p>
|
||||
<ul>
|
||||
<li><p>Add the PushNotificationIOS library to your Podfile: ./ios/Podfile</p>
|
||||
<pre><code class="hljs">
|
||||
``
|
||||
<span class="hljs-bullet">..
|
||||
</span>do
|
||||
pp
|
||||
<span class="hljs-bullet">..
|
||||
</span>S'
|
||||
<span class="hljs-bullet">...
|
||||
</span></code></pre></li>
|
||||
<pre><code class="hljs css language-ruby">target <span class="hljs-string">'myAwesomeApp'</span> <span class="hljs-keyword">do</span>
|
||||
<span class="hljs-comment"># Pods for myAwesomeApp</span>
|
||||
pod <span class="hljs-string">'React-RCTPushNotification'</span>, <span class="hljs-symbol">:path</span> => <span class="hljs-string">'../node_modules/react-native/Libraries/PushNotificationIOS'</span>
|
||||
<span class="hljs-keyword">end</span>
|
||||
</code></pre></li>
|
||||
</ul></li>
|
||||
<li><p><a href="/react-native/docs/next/linking-libraries-ios#manual-linking">Manually link</a> the PushNotificationIOS library:</p>
|
||||
<ul>
|
||||
|
||||
@@ -210,7 +210,7 @@ export <span class="hljs-keyword">default</span> Hello;
|
||||
<ul>
|
||||
<li><a href="http://www.typescriptlang.org/docs/home.html">TypeScript Handbook</a></li>
|
||||
<li><a href="https://reactjs.org/docs/static-type-checking.html#typescript">React's documentation on TypeScript</a></li>
|
||||
<li>[React + TypeScript Cheatsheets][cheats] has a good overview on how to use React with TypeScript</li>
|
||||
<li><a href="https://github.com/typescript-cheatsheets/react-typescript-cheatsheet#reacttypescript-cheatsheets">React + TypeScript Cheatsheets</a> has a good overview on how to use React with TypeScript</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="using-custom-path-aliases-with-typescript"></a><a href="#using-custom-path-aliases-with-typescript" 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>Using Custom Path Aliases with TypeScript</h2>
|
||||
<p>To use custom path aliases with TypeScript, you need to set the path aliases to work from both Babel and TypeScript. Here's how:</p>
|
||||
|
||||
@@ -210,7 +210,7 @@ export <span class="hljs-keyword">default</span> Hello;
|
||||
<ul>
|
||||
<li><a href="http://www.typescriptlang.org/docs/home.html">TypeScript Handbook</a></li>
|
||||
<li><a href="https://reactjs.org/docs/static-type-checking.html#typescript">React's documentation on TypeScript</a></li>
|
||||
<li>[React + TypeScript Cheatsheets][cheats] has a good overview on how to use React with TypeScript</li>
|
||||
<li><a href="https://github.com/typescript-cheatsheets/react-typescript-cheatsheet#reacttypescript-cheatsheets">React + TypeScript Cheatsheets</a> has a good overview on how to use React with TypeScript</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="using-custom-path-aliases-with-typescript"></a><a href="#using-custom-path-aliases-with-typescript" 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>Using Custom Path Aliases with TypeScript</h2>
|
||||
<p>To use custom path aliases with TypeScript, you need to set the path aliases to work from both Babel and TypeScript. Here's how:</p>
|
||||
|
||||
Reference in New Issue
Block a user