Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to capture user's handwritten signature in iOS app [closed]

In my app, user will request a digitized, handwritten signature from customers.

I need the ability to capture the signature as the user 'writes' it on the touchscreen. I also need to store an image of the digitized signature for future use.

I need help or pointers to enable my application to have digital signature?

like image 319
Nitya Avatar asked Jan 20 '14 18:01

Nitya


Video Answer


2 Answers

I guess these following links could help you! Anyway I found those while I's in search for the same purpose in the internet! Hope this works out for all of us!

The following links are regarding the same resource: Capturing handwritten Signature on iOS Devices.

  1. https://www.altamiracorp.com/blog/employee-posts/capture-a-signature-on-ios
  2. https://github.com/jharwig/PPSSignatureView
  3. http://java.dzone.com/articles/capture-signature-ios
  4. http://www.raywenderlich.com/18840/how-to-make-a-simple-drawing-app-with-uikit

Note:
As of today(13-Nov-2015), I noticed that the first link provided above from (altamiracorp.com) is not available for some unknown reason, may be they have put down their website. So I thought to publicly share one of my copies I have saved in EverNote, as it has some educational value theory wise. So please kindly access it here.

Guess this answer helped you! :) (Y)

like image 96
Randika Vishman Avatar answered Oct 12 '22 09:10

Randika Vishman


Since you're really talking about recording a user's "analog" signature on an iOS device, all you need to do is to create an image as the user moves a finger or stylus around a view. There are a number of tutorials on the web that illustrate that (here's one from Ray Wenderlich's site).

The basic idea is to build up a path by adding points as you track a touch in a view. When the user is done, you can save the resulting image itself or just save the path or paths. So, you'll probably create a subclass of UIView called something like SignatureView, and you'll implement the touch-related responder methods -touchesBegan:withEvent:, -touchesMoved:withEvent:, -touchesEnded:withEvent: and -touchesCancelled:withEvent:. When a touch begins, you'll create a new bezier path. Each time the touch moves, add a point to that path. When the touch ends, add the new path to the list of paths that the view has recorded. You'll probably also want a method to erase the view by clearing the path list, as well as a -drawRect: method to draw the paths and some way for the view controller to retrieve the paths or image.

Also, it should go without saying that you need to be extremely careful about what you do with a user's signature. Avoid storing unencrypted images of the signature, and perhaps avoid storing the signature on the device at all. You could instead send the signature to a server where it might be easier to protect.

like image 16
Caleb Avatar answered Oct 12 '22 09:10

Caleb