Latest 0.0.1
Homepage https://github.com/EngrAhsanAli/AASignatureView
License MIT
Platforms ios 8.0
Authors

Table of Contents

Swift 3.0 Carthage compatible CocoaPods License MIT Build Status
License MIT [CocoaPods]()

Description

AASignatureView is a simple UIView to capture digital signature by drawing it on screen easily in iOS, written in Swift. It is a customised storyboard based UIView class that allows to capture digital signature easily without writing code.

Demonstration

AASignatureView

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 8.0+
  • Xcode 8.0+
  • Swift 3+

Installation

AASignatureView can be installed using CocoaPods, Carthage, or manually.

CocoaPods

AASignatureView is available through CocoaPods. To install CocoaPods, run:

$ gem install cocoapods

Then create a Podfile with the following contents:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target '<Your Target Name>' do
pod 'AASignatureView'
end

Finally, run the following command to install it:

$ pod install

Carthage

To install Carthage, run (using Homebrew):

$ brew update
$ brew install carthage

Then add the following line to your Cartfile:

github "EngrAhsanAli/AASignatureView" 

Then import the library in all files where you use it:

import AASignatureView

Manual Installation

If you prefer not to use either of the above mentioned dependency managers, you can integrate AASignatureView into your project manually by adding the files contained in the Classes folder to your project.

Getting Started


Create object of signature view

Drag UIView object from the Object Library into your UIViewController in storyboard.

AASignatureView

Set view object as signature view

Set the view’s class to AASignatureView in the Identity Inspector.
Make sure the module property is also set to AASignatureView.

AASignatureView

Customise the signature view

You can customise the rating bar appearance in the Attributes Inspector.

Note: If storyboard does not show the stars click Refresh All Views from the Editor menu.

AASignatureView

Capture signature view as UIImage

You can capture the signature view as UIImage .

if let image = signatureView.signature {
// captured image of signature view
}

You can check if signature view is empty or not using simple property signatureView.isEmpty.

Clear signature view

You can clear the signature view by calling clear() function.

signatureView.clear()

Contributions & License

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

Pull requests are welcome! The best contributions will consist of substitutions or configurations for classes/methods known to block the main thread during a typical app lifecycle.

I would love to know if you are using AASignatureView in your app, send an email to Engr. Ahsan Ali

Latest podspec

{
    "name": "AASignatureView",
    "version": "0.0.1",
    "summary": "AASignatureView is a UIView to capture digital signature by drawing it on screen easily in iOS, written in Swift.",
    "description": "AASignatureView is a customised storyboard based UIView class that allows to capture digital signature easily without writing code.",
    "homepage": "https://github.com/EngrAhsanAli/AASignatureView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Engr. Ahsan Ali": "[email protected]"
    },
    "source": {
        "git": "https://github.com/EngrAhsanAli/AASignatureView.git",
        "tag": "0.0.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "AASignatureView/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This