是否可以在iOS模拟器中进行边缘滑动? [英] Is it possible to do an edge swipe in iOS simulator?

查看:156
本文介绍了是否可以在iOS模拟器中进行边缘滑动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS 7提供了UIScreenEdgePanGestureRecognizer,用于检测从屏幕边缘向内滑动.可以使用Xcode中的iOS7模拟器来模拟此手势吗?在屏幕区域之外单击并拖动,只会移动整个模拟器框架.

iOS 7 provides for a UIScreenEdgePanGestureRecognizer which detects swipes in from edges of the screen. Can this gesture be simulated using the iOS7 simulator in Xcode? Clicking and dragging outside the screen area just moves the whole simulator frame around.

推荐答案

您不必划过边缘即可触发UIScreenEdgePanGestureRecognizer,而只需非常靠近边缘即可开始.如果我从边缘开始的距离不超过15分,那么它会起作用.

You don't have to swipe across the edges to trigger a UIScreenEdgePanGestureRecognizer, just start very close to the edge. It works if I start not more than ~15 points from the edge.

(如果是模拟器,则为这个.我从未在设备上进行过测试)

(this if for the simulator. I never tested this on a device)

作为旁注:您必须为每个边缘创建一个actionRecognizer.您不能将边或在一起,因此UIRectEdgeAll将不起作用.

As a side note: You have to create a gestureRecognizer for each edge. You can't OR edges together, so UIRectEdgeAll won't work.

这篇关于是否可以在iOS模拟器中进行边缘滑动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆