Latest 0.1.1
Homepage https://github.com/Posix88/AMDragDrop
License MIT
Platforms ios 9.0, requires ARC
Authors

Version
License
Platform

Installation

AMDragDrop is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "AMDragDrop"

Description

AMDragDrop is a simple subclass for UIView that adds in a simple way the drag and drop funtionality.

In order to enable dragging on your view you have to call this:

dragView.enableDragging(dragDelegate: self, dropViews: [(dropView)])

with dropViews is an array of possible UIView in which you could drop your view.

The module expose two protocols you could subscribe to: AMDragDropDelegate and AMHoverDelegate.

AMDragDropDelegate

This is the protocol you have to subscribe to in order to have the basic information of the drag and drop funtionality.

The only mandatory method is:

func view(_ view: UIView, wasDroppedOnDrop drop: UIView!)

This method informs you that your dragged view was dropped on the drop views that you specified during the initialization.

If you’re not interested in using drop views you could use:

func draggingEnd(forView view:UIView)

AMHoverDelegate

This is the protocol you have to subscribe to in order to have the basic information during the hovering of your view on the drop views that you specified during the initialization.

Author

Made with love ❤️ by Antonino Francesco Musolino.
Twitter @Ninomusolino

License

This is a modified and "Swifty" version of UIView+DragDrop by ryanmeisters.

AMDragDrop is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AMDragDrop",
    "version": "0.1.1",
    "summary": "A UIView subclass that provide drag & drop functionality.",
    "description": "AMDragDrop is a simple subclass for UIView that adds in a simple way the drag and drop funtionality. Feel free to Use/Modify!",
    "homepage": "https://github.com/Posix88/AMDragDrop",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Antonino Francesco Musolino": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Posix88/AMDragDrop.git",
        "tag": "0.1.1"
    },
    "social_media_url": "https://twitter.com/Ninomusolino",
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source_files": "Library/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This