Latest 1.0.0
Homepage https://github.com/ahmetkgunay/DrawPathView
License MIT
Platforms ios 8.0, requires ARC
Authors

[![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)
Version
License
Platform

Drawable View with any colors you want to fill and can be erased last path or all paths anytime

Anim

Usage

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()
    }

Delegates

DrawPathView has also two delegate methods :

  • viewDrawStartedDrawing : Calls when user started drawing
  • viewDrawEndedDrawing : Calls when user ended drawing

// MARK: - DrawPathView Delegate -

    func viewDrawStartedDrawing() {
        print("Started Drawing")
    }

    func viewDrawEndedDrawing() {
        print("Ended Drawing")
    }

Requirements

Installation

DrawPathView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "DrawPathView"

Author

Ahmet Kazım Günay, [email protected]

License

DrawPathView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "DrawPathView",
    "version": "1.0.0",
    "summary": "Drawable View written in pure Swift 4",
    "description": "Easy to use drawable custom View written in pure Swift 4. You can delete paths or delete last drawn path. You can also draw paths with any colors you want and change this color whenever you want.",
    "homepage": "https://github.com/ahmetkgunay/DrawPathView",
    "license": "MIT",
    "authors": {
        "Ahmet Kazu0131m Guu0308nay": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ahmetkgunay/DrawPathView.git",
        "tag": "1.0.0"
    },
    "social_media_url": "https://twitter.com/ahmtgny",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "DrawPathView.swift",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This