TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Ahmet Kazım Günay.
[![CI Status](http://img.shields.io/travis/Ahmet Kazım Günay/DrawPathView.svg?style=flat)](https://travis-ci.org/Ahmet Kazım Günay/DrawPathView)
Drawable View with any colors you want to fill and can be erased last path or all paths anytime
Usage is simple, you can just add as a subview DrawPathView which is inheritted from UIView to any Custom view.
lazy var drawView : DrawPathView = {
let dv = DrawPathView(frame: self.view.bounds)
dv.lineWidth = 10.0
dv.delegate = self
return dv
}()
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(drawView)
}
User also can delete paths as last drawn path or all paths at the same time.
internal func eraseLast() {
drawView.clearLast()
}
internal func eraseAll() {
drawView.clearAll()
}
DrawPathView has also two delegate methods :
// MARK: - DrawPathView Delegate -
func viewDrawStartedDrawing() {
print("Started Drawing")
}
func viewDrawEndedDrawing() {
print("Ended Drawing")
}
DrawPathView is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod "DrawPathView"
Ahmet Kazım Günay, [email protected]
DrawPathView is available under the MIT license. See the LICENSE file for more info.