-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.md
65 lines (45 loc) · 1.75 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# FilesDropView
[![CI Status](http://img.shields.io/travis/zzdjk6@126.com/FilesDropView.svg?style=flat)](https://travis-ci.org/zzdjk6@126.com/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
zzdjk6@126.com, zzdjk6@gmail.com
## License
FilesDropView is available under the MIT license. See the LICENSE file for more info.