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

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

问题描述

在我的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.

需要做什么?

我怎么认出来?

推荐答案

使用 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. :)

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

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