https://github.com/coderyi/yiviewdrag
UIView extension that adds dragging capabilities
https://github.com/coderyi/yiviewdrag
drag ios swift view
Last synced: 11 months ago
JSON representation
UIView extension that adds dragging capabilities
- Host: GitHub
- URL: https://github.com/coderyi/yiviewdrag
- Owner: coderyi
- License: mit
- Created: 2021-10-04T09:53:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-04T09:55:58.000Z (almost 5 years ago)
- Last Synced: 2025-03-10T23:34:56.324Z (over 1 year ago)
- Topics: drag, ios, swift, view
- Language: Swift
- Homepage:
- Size: 27.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YiViewDrag
[](https://travis-ci.org/coderyi/YiViewDrag)
[](https://cocoapods.org/pods/YiViewDrag)
[](https://cocoapods.org/pods/YiViewDrag)
[](https://cocoapods.org/pods/YiViewDrag)
## Installation
YiViewDrag is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod 'YiViewDrag'
```
## Usage
enable drag
```
view.vd_enableDrag()
```
The movement area can be restricted to a given rect:
```swift
view.vd_cagingArea = CGRect(x: 0, y: 0, width: 300, height: 300)
```
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## License
YiViewDrag is available under the MIT license. See the LICENSE file for more info.