Eksperiment626
Eksperiment626

Reputation: 1007

How to drag and drop any object with same code?

I'm building an app for the iPhone and I need to drag and drop allot of different objects.

I have found allot of separate ways to drag and drop UIImageViews, UIButtons etc. But I was wondering if there is a universal way to program any object to able to drag and drop?

Upvotes: 1

Views: 2000

Answers (1)

Jamie
Jamie

Reputation: 5112

You may want to consider using one or more UIGestureRecognizers for each view. Here's a reference to the docs.

http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIGestureRecognizer_Class/Reference/Reference.html

Upvotes: 1

Related Questions