如何在iPhone SDK中检测滑动手势? [英] How to detect Swipe Gesture in iPhone SDK?

查看:127
本文介绍了如何在iPhone SDK中检测滑动手势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的iPhone应用程序中,我需要识别用户在视图上所做的滑动手势。

In my iPhone app, I require to recognize the swipe gesture made by the user on the view.

我希望识别滑动手势并执行功能在滑动。

I want the swipe gestures to be recognized and perform a function on swipe.

我需要视图水平滑动并在用户进行滑动手势时显示另一个视图。

I need that the view should horizontally slide and show another view as a user makes a swipe gesture.

需要做什么?

如何识别它?

任何指示或教程都会非常感谢。

Any directions or tutorials will be really appreciated.

推荐答案

使用 UISwipeGestureRecognizer 。真的没什么可说的,手势识别器很容易。甚至还有关于该主题的 WWDC10视频。会议120和121. :)

Use the UISwipeGestureRecognizer. Not much else to say really, gesture recognizers are easy. There are WWDC10 videos on the subject even. Sessions 120 and 121. :)

这篇关于如何在iPhone SDK中检测滑动手势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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