简体   繁体   English

如何使用向左或向右滑动实现3D Touch预览操作?

[英]How to implement 3D Touch preview action with left or right swipe?

I know how to add UIPreviewActionItem when swipe from the bottom. 我知道如何从底部滑动时添加UIPreviewActionItem There is a method previewActionItems() . 有一个方法previewActionItems() But how to do the following thing: 但是如何做以下事情:

在此输入图像描述 在此输入图像描述

Left and right swipe is a custom implementation by Apple engineers. 左右滑动是Apple工程师的自定义实现。 Broke my heart when I found that out as well. 当我发现它时,打破了我的心。

As Apple's documentation says: 正如Apple的文档所说:

Provide peek quick actions, if appropriate. 如果合适,请提供快速行动。 Within a peek, users can swipe up to reveal actions that are related to the item. 在一瞥之中,用户可以向上滑动以显示与项目相关的操作。

There is nothing about left/right swipe. 左/右滑动没什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM