ios 如何在ios模拟器上模仿两指滚动/拖动手势?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13275832/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 21:08:03  来源:igfitidea点击:

How to mimic two-finger scroll/drag gesture on ios simulator?

iosscrolldragsimulatorgesture

提问by Tony Xu

I have a scroll page that I specified two fingers minimum. It works on my device, but don't know how to mimic this gesture on Simulator. I can mimic one-finger scroll without problem. I've tried option/ctrl/shift etc, but couldn't get it work. Maybe my combination is wrong. Anyone knows how? Thanks.

我有一个滚动页面,我指定了最少两个手指。它适用于我的设备,但不知道如何在模拟器上模仿此手势。我可以毫无问题地模仿单指滚动。我试过 option/ctrl/shift 等,但无法让它工作。也许我的组合是错误的。有谁知道怎么做?谢谢。

回答by Joe C

Holding the "Alt/Option" key and dragging simulates multi-touch pinch-to-zoom.

按住“Alt/Option”键并拖动模拟多点触控双指缩放。

Holding "Alt/Option + Shift" and dragging simulates multi-touch scrolling.

按住“Alt/Option + Shift”并拖动模拟多点触控滚动。

回答by Eric Giguere

There is a nice table with all the supported gestures in the iOS Simulator User Guide from Apple. Here is the extract for the two-finger drag:

Apple 的 iOS 模拟器用户指南中有一个包含所有支持手势的漂亮表格。这是两指拖动的摘录:

  1. Place the pointer where you want the two-finger drag to occur.
  2. Hold down the Option key.
  3. Move the circles that represent finger touches to the start position.
  4. Move the center of the pinch target by holding down the Shift key, moving the circles to the desired center position, and releasing the Shift key.
  5. Hold down the Shift key and the mouse button, move the circles in the direction you want to drag, and release both the Shift key and the mouse button.
  1. 将指针放在您希望发生双指拖动的位置。
  2. 按住 Option 键。
  3. 将代表手指触摸的圆圈移动到开始位置。
  4. 按住 Shift 键,将圆圈移动到所需的中心位置,然后松开 Shift 键,移动捏合目标的中心。
  5. 按住 Shift 键和鼠标按钮,沿要拖动的方向移动圆圈,然后松开 Shift 键和鼠标按钮。

Hope it helps.

希望能帮助到你。

回答by Skulas

The best way to scroll in the iPad simulator is by the Three Fingers dragging, which is a global setup of the OS X and not a particular feature of the iOS simulator.

在 iPad 模拟器中滚动的最佳方式是通过三指拖动,这是 OS X 的全局设置,而不是 iOS 模拟器的特定功能。

In order to scroll using three fingers you need to turn on the 'Three Finger Drag' under TrackPad > Point and Click in the Settings App of OS X.

为了使用三指滚动,您需要在 OS X 的设置应用程序中打开 TrackPad > Point and Click 下的“Three Finger Drag”。

and to set the Mission Control and App Exposé to use four fingers (in TrackPad > More Gestures in the Settings App of OS X)

并将 Mission Control 和 App Exposé 设置为使用四根手指(在 OS X 的设置应用程序中的 TrackPad > More Gestures 中)

(I made beautiful screenshots, but I'm too rocky to post answers with images)

(我做了漂亮的截图,但我太难了,无法用图片发布答案)

回答by Ram Madhavan

To appear two fingers:

出现两个手指:

press ALT and drag mouse.

To zoom using two fingers:

使用两根手指进行缩放:

press ALT and press SHIFT (to adjust touches.After adjusting release SHIFT key) and drag mouse.

回答by David West

Things moved around in Sierra for me, but here is how I enabled 3-finger scrolling:

对我来说,事情在 Sierra 中四处移动,但这是我启用三指滚动的方式:

  1. **System Preferences > Accessibility
  2. Scroll down to Mouse & Trackpadand tap Trackpad options
  3. Make sure 'Enable Dragging' is selected
  4. Select 'three finger drag' from the drop-down
  1. **系统偏好设置 > 辅助功能
  2. 向下滚动到鼠标和触控板,然后点击触控板选项
  3. 确保选择了“启用拖动
  4. 从下拉菜单中选择“三指拖动

Makes such a big difference when testing on various devices & simulators.

在各种设备和模拟器上进行测试时会产生如此大的差异。

回答by Fizer Khan

It works with Three fingerscroll on the Track pad.

它适用于触控板上的三指滚动。

回答by matm

It works for me on MBP trackpad as well as on Magic Trackpad.

它适用于 MBP 触控板和 Magic Trackpad。

The clue is to enable "Three finger drag" in Trackpad settings (Preferences.app), then dragging, while ALT+SHIFT are pressed, makes scrolling work as expected.

线索是在触控板设置 (Preferences.app) 中启用“三指拖动”,然后拖动,同时按下 ALT+SHIFT,使滚动按预期工作。

It also works with the "Three finger scroll".

它也适用于“三指滚动”。