0

I am a newbee in iOS development; and i want to develop a simple application.

In my application there is a view that is a member of xib. I want to receive user's touch and slide actions on my view to run some sliding animations.

I found some codes about this animation but i couldn't find how can i receive sliding action in UIView.

At least, i wanna explain why i used view. This view will contains two or more labes. So i couldn't be sure to choose Rect Button or UIView.

I hope you can help me.

bahadir arslan
  • 4,535
  • 7
  • 44
  • 82

1 Answers1

0

You need to look at Gesture Recognizers. There are tonnes of resources and examples online. For example, here's an example on how to use swipe (slide) gesture recognizers.

Sid
  • 9,508
  • 5
  • 39
  • 60
  • Very thanks for your answer. It is what i need. But i have one more question, how can i get gesture length? I can get where the gesture starts, but i couldn't find how can i get length of gesture. – bahadir arslan May 01 '11 at 20:35
  • Don't think you can do that with swipes. Another user asked the same question and someone recommended him to use pan gestures instead. Check it out here - http://stackoverflow.com/questions/4828833/uiswipegesturerecognizer-swipe-length – Sid May 02 '11 at 17:25