views:

21

answers:

2

I am wanting to create a button in my iPhone app that when touched will return other draggable elements to their original position. I have looked at the Apple "MoveMe' example, but that returns the button to the center of the screen. I want to be able to position draggable objects around the screen, drag the objects within the app, and then return them to their original starting positions by pressing a designated button.

Any help appreciated!

+1  A: 

Cache the initial positions of your draggable objects, and use an event handler on the button to reset their positions. I'm a little confused. The MoveMe example code is exactly what you need to answer your question -- what more do you want? You won't find a perfect code example for any arbitrary problem you can dream up.

Shaggy Frog
Yes I understand that the MoveMe example is good, but it does not give suggestions for moving the draggable objects back to their original location, it moves them to the center of the screen. That's why I was asking for help.
Matt Thomas
A: 

Play around with saving the original positions and using MoveMe to reset the objects and I bet you'll have what your looking for in no time at all.

kirk.burleson