![](https://i-blog.csdnimg.cn/blog_migrate/9924c5840651fa20fd05d8e4d0cec5d1.png)
If you’re an iPhone or iPad owner you’ve probably come across share and action extensions, but what are they and how do you use them? Both add power and capabilities to apps, and they can change the way you use your devices.
如果您是iPhone或iPad的所有者,则可能会遇到共享和操作扩展,但是它们是什么以及如何使用它们? 两者都可以为应用程序增加功能,并可以改变您使用设备的方式。
A share extension makes it quick and easy to share content with people or, in some cases, other apps. Imagine reading a great guide on How-to Geek, but you need to leave to catch a train. Using a share extension, you could save that guide to your favorite read-later service. Want to send it to a friend? There’s a share extension for that, too. Think of share extensions as ways to get data out of apps in some way, and you’ll be spot on.
共享扩展程序可让您轻松快捷地与他人或在某些情况下与其他应用共享内容。 想象一下,阅读有关如何使用极客的很棒的指南,但是您需要离开去赶火车。 使用共享扩展名,可以将该指南保存到您最喜欢的后期服务中。 想要发送给朋友? 也有一个共享扩展名。 将共享扩展名视为以某种方式从应用程序中获取数据的方法,您会发现的。
Action extensions work much the same way, but let you use features from other apps without having to open them explicitly. A great example here is creating new tasks and projects in your favorite task manager, using the source as an attachment. Before the arrival of iOS 12 and its improved support for password autofill, accessing passwords from within password managers was also a great example of a powerful use for action extensions.
动作扩展的工作方式几乎相同,但是您可以使用其他应用程序中的功能,而不必显式打开它们。 一个很好的例子是在您喜欢的任务管理器中使用源作为附件创建新任务和项目。 在iOS 12到来及其对密码自动填充的改进支持之前,从密码管理器中访问密码也是动作扩展功能强大使用的一个很好的例子。
Both action and share extensions work the same way, which means if you know how to use one, you know how to use both. We’re going to explain how to enable extensions, re-order them, and use them here.
动作扩展和共享扩展都以相同的方式工作,这意味着如果您知道如何使用扩展,就知道如何使用两者。 我们将在此处说明如何启用扩展,重新排序和使用它们。
如何启用操作或共享扩展 (How to Enable an Action or Share Extension)
To enable an action or share extension, open an app that allows you to share content. Safari is a good example because everyone has it and it’s usually on the home screen. Once open, visit a website and tap the “Share” button in the navigation bar at the bottom of the screen.
要启用操作或共享扩展程序,请打开一个允许您共享内容的应用程序。 Safari是一个很好的例子,因为每个人都有它,并且通常在主屏幕上。 打开后,访问网站,然后点击屏幕底部导航栏中的“共享”按钮。
![](https://i-blog.csdnimg.cn/blog_migrate/ea1e1c096bfa0b19da0f5ec14340fd5f.png)
You will now see the Share Sheet, an area that shows share extensions on the top row and action extensions on the bottom. Depending on which type of extension you want to enable, scroll all the way to the far right and tap the “More” button.
现在,您将看到“共享表”,该区域在顶部一行显示共享扩展名,在底部显示操作扩展名。 根据您要启用的扩展名类型,一直滚动到最右边,然后点击“更多”按钮。
![](https://i-blog.csdnimg.cn/blog_migrate/deaea9d1bbece9c81b518a39fdc7ebaa.png)
The next screen shows every available action or share extension, depending on the row you selected. To enable an extension, toggle the switch beside it.
下一个屏幕显示每个可用的操作或共享扩展,具体取决于您选择的行。 要启用扩展,请拨动旁边的开关。
![](https://i-blog.csdnimg.cn/blog_migrate/32388758e1f32cde58ddf196101f8bc8.png)
![](https://i-blog.csdnimg.cn/blog_migrate/f99c65ff78faf3b1f3cd241138f03eb0.png)
如何对操作或共享扩展程序重新排序 (How to Reorder Action or Share Extensions)
Re-ordering extensions is vital if you have a lot of them enabled, making it easier to find the ones that you use most frequently. To get started, let’s use Safari as our jumping off point once more. Again, after visiting a website tap the “Share” button. You’ll see the Share Sheet we mentioned earlier with share extensions in the top row and action extensions in the bottom. To re-order those extensions, again scroll to the far-right of the list and tap the “more” button. Now, when you see the list of extensions, tap and hold on the three horizontal lines beside one and then drag it up or down the list to reorder it.
如果您启用了很多扩展,则对扩展进行重新排序至关重要,这样可以更轻松地找到最常用的扩展。 首先,让我们再次使用Safari作为出发点。 再次,在访问网站后,点击“共享”按钮。 您将看到我们前面提到的共享表,其顶部显示为共享扩展名,底部显示为操作扩展名。 要重新排列这些扩展名,请再次滚动到列表的最右边,然后点击“更多”按钮。 现在,当您看到扩展列表时,点击并按住扩展名旁边的三条水平线,然后在列表中上下拖动以重新排序。
![](https://i-blog.csdnimg.cn/blog_migrate/8e289c7bbf0b87c29dbc36d823d26ff2.png)
![](https://i-blog.csdnimg.cn/blog_migrate/2c5c7a75640e8397293285f6619065de.png)
如何使用操作或共享扩展 (How to Use Action or Share Extensions)
Once you have all of your extensions enabled and ordered just so, using them is a simple case of tapping the “Share” button and then tapping the icon of the extension that you want to use. One thing to remember here is that only extensions that work with the content at hand show up in this view. That means that extensions that can only accept or work with images will not appear if you are sharing a website, for example.
启用并订购所有扩展程序后,只需点击“共享”按钮,然后点击要使用的扩展程序图标,即可使用它们。 这里要记住的一件事是,只有与当前内容配合使用的扩展程序才会在此视图中显示。 这意味着,例如,如果您共享一个网站,则仅会接受或使用图像的扩展名不会出现。
![](https://i-blog.csdnimg.cn/blog_migrate/150e54827fa8d3d26c98d607d52a60f4.png)
翻译自: https://www.howtogeek.com/395830/how-to-use-action-and-share-extensions-on-iphone-and-ipad/