当地图视图只是屏幕的一部分时,如何在 iOS 模拟器中捏出?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11622579/
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 19:24:31  来源:igfitidea点击:

How to pinch out in iOS simulator when map view is only a portion of the screen?

iosmkmapviewsimulator

提问by Christopher

I have a view on the iPad that I am adding an MKMapView to that is say half the height of the full screen. However, when I try to pinch out on the iOS Simulator it doesn't work since the to nubs fill the entire iPad view on the simulator.

我在 iPad 上有一个视图,我正在添加一个 MKMapView,也就是说全屏高度的一半。但是,当我尝试在 iOS 模拟器上捏合时,它不起作用,因为小块填充了模拟器上的整个 iPad 视图。

And so, with the map view half the screen and I press the "Option" key on the keyboard I cannot grab the map to pinch out.

因此,在地图视图占屏幕一半的情况下,我按下键盘上的“Option”键,我无法抓取地图来捏出。

Anyone know how to handle this?

有谁知道如何处理这个?

回答by dandan78

You can move the two gray circles that represent your fingers around the screen by holding Optionand Shiftand moving the mouse.

您可通过移动两个灰色圆圈代表在屏幕上你的手指Option,并Shift和移动鼠标。

回答by Glenn

Try double tapping with the "Option" key pressed. On the iPhone this causes the MKMapView to zoom out.

尝试在按下“Option”键的情况下双击。在 iPhone 上,这会导致 MKMapView 缩小。

回答by Hutjepower

Only pressing the alt key made the two gray dots representing your fingers appear for me...

只有按下 alt 键,我才会出现代表你手指的两个灰色点...

回答by KSR

You can use Option (Alt) button or combination of Option button and command button along with mouse movement to zoom in and zoom out a map or an image.

您可以使用 Option (Alt) 按钮或 Option 按钮和命令按钮的组合以及鼠标移动来放大和缩小地图或图像。

回答by l-l

There is another way to do this:

还有另一种方法可以做到这一点:

1- While holding the control key click with the mouse on where you would like to center the pinch gesture. This will cause one gray dot to remain on the screen. (Once its there, you can let go of the control key)

1- 在按住控制键的同时,用鼠标单击要使捏合手势居中的位置。这将导致屏幕上保留一个灰点。(到了那里,你可以放开控制键)

2- Now you can use the mouse to click and drag around the gray dot you specified in step 1

2- 现在您可以使用鼠标在步骤 1 中指定的灰点周围单击并拖动

Once you are done you can remove the gray dot by tapping on it

完成后,您可以通过点击它来删除灰点

回答by sidewaiise

Updated Solution:

更新的解决方案:

Holding Option and Command gives you 2 finger vectors that spread out and in. Holding the mouse button down on the way in will pinch in and visa versa for spreading out.

按住 Option 和 Command 为您提供 2 个展开和向内的手指向量。在进入的过程中按住鼠标按钮将捏入,反之亦然以展开。

回答by Keshu R.

2019-20 UPDATE

2019-20 更新

To zoom in

放大

alt/option+ pinch in using mouse

alt/option+ 使用鼠标捏合

Alternate option: control+ click (This will place a gray circle on the map, now you can click and drag your mouse to zoom in and out. If you want to disable it, just click on the circle again)

替代选项control+ 单击(这将在地图上放置一个灰色圆圈,现在您可以单击并拖动鼠标来放大和缩小。如果您想禁用它,只需再次单击圆圈)

To zoom out

缩小

alt/option+ pinch out using mouse

alt/option+ 用鼠标捏开

To get flat view of the map

获取地图的平面视图

Zoom to an area in map then Shift+ alt/option+ click and drag mouse

放大到地图的区域然后Shift+ alt/option+单击并拖动鼠标

回答by iPhoneDeveloper

For Zooming in double tap using mouse. For Zooming out press and hold on option/alt key this will give you 2 grey circles which represents your 2 fingers and drag your mouse up. To Zoom in drag your mouse down with option key pressed(or double tap on mouse)

使用鼠标双击放大。要缩小,请按住 option/alt 键,这将为您提供 2 个灰色圆圈,代表您的 2 个手指并向上拖动鼠标。要放大,按住选项键向下拖动鼠标(或双击鼠标)