Table of Contents
#AASignatureView
##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
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" "master"
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.
##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.
##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.
##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



