Giter Club home page Giter Club logo

epsignature's Introduction

EPSignature

EPSignature

Signature component for iOS written in Swift

Platform Swift 2.2 CI Status Version Carthage compatible License Twitter: @HaveYouMetPrabu

Preview

Screenshot Screenshot

Installation

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

pod "EPSignature"

To integrate EPSignature into your Xcode project using Carthage, specify it in your Cartfile:

github "ipraba/EPSignature"
Manual Installation

Just drag and drop the files in Pod/Classes folder into your project

Features

  1. User can draw the signature either by finger or by apple pencil
  2. Ability to save the signature as default signature which can be retrieved later
  3. Ability to load the saved signature
  4. Works on both orientations(portrait and landscape)
  5. Works on both iPhone and iPad devices
  6. Also can be embedded in any container view
  7. Can extract the signature as Image
  8. Draws smoothly

Initialization of EPSignatureViewController

let signatureVC = EPSignatureViewController(signatureDelegate: self, showsDate: true, showsSaveSignatureOption: true)
signatureVC.subtitleText = "I agree to the terms and conditions"
signatureVC.title = "John Doe"
let nav = UINavigationController(rootViewController: signatureVC)
presentViewController(nav, animated: true, completion: nil)

Note: You can also embed the signature view in any one of the container using the EPSignatureView

Properties of EPSignatureViewController

Properties Description
showsDate Bool value that allows to show the date while signing
showsSaveSignatureOption Bool value that allows the user to save the signature for future use
signatureDelegate Delegate listening for events
subtitleText Subtitle text for signature(Eg: Sign here)
tintColor Tint color for the view controller. Applies for barbuttons, switches and actionsheet

Properties of EPSignatureView

Properties Description
strokeColor Stroke color of the signature
strokeWidth Stroke width of the signature
isSigned Bool value checks whether the user has signed or not

EPSignatureViewController Delegates

func epSignature(_: EPSignature.EPSignatureViewController, didCancel error: NSError)
func epSignature(_: EPSignature.EPSignatureViewController, didSigned signatureImage: UIImage, boundingRect: CGRect)

Note: boundingRect will contain the bounds of the signed image retrieved. Crop using this rect to make shorter and small signature images

License

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

Author

@ipraba

epsignature's People

Contributors

ipraba avatar splpeancovschi avatar basthomas avatar cmanou avatar readmecritic avatar

Watchers

James Cloos avatar Xie Wu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.