Proemion / SignaturePad

Signature pad using UIBezierPath written in Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Travis CI

SignaturePad

Alt Text

Signature Pad using UIBezierPath written in Swift.

Features

  • Free hand drawing pad
  • Clear drawing pad
  • Pen's color selection
  • Pen's size selection
  • Ink pen style signature

Installation

CocoaPods is a dependency manager for Cocoa projects.

You can use CocoaPods to install SignaturePad by adding it to your Podfile:

platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'SignaturePad', '~> 1.0.3'
end

Then, run the following command:

$ pod install

Usage

Change your view to custom view by simply put SignaturePad to your view.

Alt Text

Import

import SignaturePad

class ViewController: UIViewController {

    @IBOutlet weak var signaturePad: SignaturePad!
}

Clear

  signaturePad.clear()

Get signature

  if let signature = signaturePad.getSignature() {
      // Do Something
  }

Delegate

import SignaturePad

class ViewController: UIViewController, SignaturePadDelegate {

    @IBOutlet weak var signatureView: SignaturePad!  

    override func viewDidLoad() {
        super.viewDidLoad()
        self.signatureView.delegate = self
    }
    func didStart() {
    }

    func didFinish() {
    }
}

License

SignaturePad is released under the MIT license. See LICENSE for details.

About

Signature pad using UIBezierPath written in Swift.

License:MIT License


Languages

Language:Swift 67.1%Language:Ruby 27.7%Language:Objective-C 4.4%Language:Shell 0.7%