[iOS] A draggable view (Dragging within and especially out of scrollviews)
Objective-C Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Classes preserve the order of the cards Oct 24, 2014
DroppableViewTest.xcodeproj updated signing Oct 23, 2014
DroppableViewTest/Images.xcassets removed old assets Oct 23, 2014
Library/DroppableView move scrollview check to beginDrag method, refs #8 Oct 24, 2014
SupportingFiles removed old assets Oct 23, 2014
.gitignore removed user data, added ignores for userdata Mar 25, 2012
JDDroppableView.podspec version bump Oct 24, 2014
readme.md updated usage instructions Oct 23, 2014
screenshots.png updated readme / screenshot Oct 23, 2014



A DroppableView represents a single draggable View. You may use it as a base class for any view, that you need to be draggable in your project. You can even use it to drag something out of a scrollview, as you can see in the example project: The white cards can be dragged out of the scrollView onto the gray & red circles. Try it!



Just subclass from JDDroppableView and your ready to go. If you want to use specific drop-targets, you can use any of the following APIs to add them:

- (id)initWithDropTarget:(UIView*)target;
- (void)addDropTarget:(UIView*)target;
- (void)removeDropTarget:(UIView*)target;
- (void)replaceDropTargets:(NSArray*)targets;
  • target is a view (outside of the scrollview), to where the element should be draggable

NOTE: If you use a DroppableView within a UIScrollView, you need to set canCancelContentTouches = NO; on the scrollView.