views:

57

answers:

2

Hej folks,

I got an UIView in my application and want to implement kind of a swipe gesture. I know how I detect this gesture (touchesBegan: and touchesEnded: for example is x coordinates are distanced more than 100 pixels or something else) but I really don´t now how to animate my needs. In fact my UIView will contain subviews which are 9 UIButtons. On swipe I want to change the set of buttons programatically...any solutions out there? Primarily need the animation!

EDIT: I thought about programatically moving the buttons off-screen to the left and at the same time move the new ones on-screen from the right side. But it seems I don't really know how to realize this...isn't it too much leaking at the same time? Please give me a hint!

A: 

why you don't load just a new view with the other button set in your window after the swipe gesture was detected?

Micko
A: 

It's seem that you want to recreate somethings like the springboard but with button instead of icon. I can suggest you to use UIScrollView.

Luca Bernardi
Mhm, this seems the nicer ones of the answers :) Is there any way to "page" the buttons? But this approch would mean a really strange work in interface builder wouldn't it?
Tim Specht
Take a look to this tutorial:http://www.xprogress.com/post-53-how-to-build-uiscrollview-with-page-control/
Luca Bernardi
Luca Bernardi solved it...thanks a lot!
Tim Specht