Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zzdjk6/filesdropview
A files drop view for macOS (OSX). Easy to use, customizable, and functional out of box.
https://github.com/zzdjk6/filesdropview
cocoa
Last synced: 20 days ago
JSON representation
A files drop view for macOS (OSX). Easy to use, customizable, and functional out of box.
- Host: GitHub
- URL: https://github.com/zzdjk6/filesdropview
- Owner: zzdjk6
- License: mit
- Created: 2017-02-12T14:53:57.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-12T15:27:17.000Z (almost 8 years ago)
- Last Synced: 2024-12-11T22:17:21.527Z (about 2 months ago)
- Topics: cocoa
- Language: Swift
- Size: 38.1 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FilesDropView
[![CI Status](http://img.shields.io/travis/[email protected]/FilesDropView.svg?style=flat)](https://travis-ci.org/[email protected]/FilesDropView)
[![Version](https://img.shields.io/cocoapods/v/FilesDropView.svg?style=flat)](http://cocoapods.org/pods/FilesDropView)
[![License](https://img.shields.io/cocoapods/l/FilesDropView.svg?style=flat)](http://cocoapods.org/pods/FilesDropView)
[![Platform](https://img.shields.io/cocoapods/p/FilesDropView.svg?style=flat)](http://cocoapods.org/pods/FilesDropView)## How to use
1. create an IBOutlet `weak var filesDropView: FilesDropView?`, or create the view with code.
2. setup callbacks
You can use `onFilesDropped` shorcut callback only, or do more customize with other callbacks.
```swift
// 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
}
```3. done
## Requirements
* Swfit 3
* XCode 8.2.1 or later (tested on XCode 8.2.1)## Installation
FilesDropView is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "FilesDropView"
```## Author
[email protected], [email protected]
## License
FilesDropView is available under the MIT license. See the LICENSE file for more info.