Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
[iOS] A draggable view (Dragging within and especially out of scrollviews)
branch: master
Failed to load latest commit information.
Classes
DroppableViewTest.xcodeproj updated signing
DroppableViewTest/Images.xcassets removed old assets
Library/DroppableView move scrollview check to beginDrag method, refs #8
SupportingFiles removed old assets
.gitignore removed user data, added ignores for userdata
JDDroppableView.podspec version bump
LICENSE renamed license file
readme.md updated usage instructions
screenshots.png updated readme / screenshot

readme.md

DroppableView

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!

Screenshot

Usage

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.

Something went wrong with that request. Please try again.