-
create an IBOutlet
weak var filesDropView: FilesDropView?
, or create the view with code. -
setup callbacks
You can use
onFilesDropped
shorcut callback only, or do more customize with other callbacks.// Basic shortcut filesDropView?.onFilesDropped = { filePathList in print("FilesDropView::onFilesDropped") dump(filePathList) } // More complex callback filesDropView?.onDraggingEnterd = { sender in print("FilesDropView::onDraggingEnterd") dump(sender) return .every } filesDropView?.onDraggingEnded = { sender in print("FilesDropView::onDraggingEnded") dump(sender) } filesDropView?.onDraggingUpdated = { sender in print("FilesDropView::onDraggingUpdated") dump(sender) return .every }
-
done
- Swfit 3
- XCode 8.2.1 or later (tested on XCode 8.2.1)
FilesDropView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "FilesDropView"
[email protected], [email protected]
FilesDropView is available under the MIT license. See the LICENSE file for more info.