mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
12 lines
2.2 KiB
Markdown
12 lines
2.2 KiB
Markdown
---
|
|
id: actionsheetios
|
|
title: ActionSheetIOS
|
|
category: APIs
|
|
permalink: docs/actionsheetios.html
|
|
---
|
|
<div><div></div><span><h3><a class="anchor" name="methods"></a>Methods <a class="hash-link" href="docs/actionsheetios.html#methods">#</a></h3><div class="props"><div class="prop"><h4 class="methodTitle"><a class="anchor" name="showactionsheetwithoptions"></a><span class="methodType">static </span>showActionSheetWithOptions<span class="methodType">(options, callback)</span> <a class="hash-link" href="docs/actionsheetios.html#showactionsheetwithoptions">#</a></h4><div><p>Display an iOS action sheet. The <code>options</code> object must contain one or more
|
|
of:</p><ul><li><code>options</code> (array of strings) - a list of button titles (required)</li><li><code>cancelButtonIndex</code> (int) - index of cancel button in <code>options</code></li><li><code>destructiveButtonIndex</code> (int) - index of destructive button in <code>options</code></li><li><code>title</code> (string) - a title to show above the action sheet</li><li><code>message</code> (string) - a message to show below the title</li></ul></div></div><div class="prop"><h4 class="methodTitle"><a class="anchor" name="showshareactionsheetwithoptions"></a><span class="methodType">static </span>showShareActionSheetWithOptions<span class="methodType">(options, failureCallback, successCallback)</span> <a class="hash-link" href="docs/actionsheetios.html#showshareactionsheetwithoptions">#</a></h4><div><p>Display the iOS share sheet. The <code>options</code> object should contain
|
|
one or both of <code>message</code> and <code>url</code> and can additionally have
|
|
a <code>subject</code> or <code>excludedActivityTypes</code>:</p><ul><li><code>url</code> (string) - a URL to share</li><li><code>message</code> (string) - a message to share</li><li><code>subject</code> (string) - a subject for the message</li><li><code>excludedActivityTypes</code> (array) - the activities to exclude from the ActionSheet</li></ul><p>NOTE: if <code>url</code> points to a local file, or is a base64-encoded
|
|
uri, the file it points to will be loaded and shared directly.
|
|
In this way, you can share images, videos, PDF files, etc.</p></div></div></div></span></div> |