   override func viewDidLoad() {
     super.viewDidLoad()
     // Do any additional setup after loading the view, typically from a nib.
+    
+    drawSignatureView.delegate = self
   }
 
   override func didReceiveMemoryWarning() {

  
  @IBAction func saveSignature(sender: UIButton) {
    // Getting the Signature Image from self.drawSignatureView using the method getSignature().
    let signatureImage = self.drawSignatureView.getSignature()
    
    // Saving signatureImage from the line above to the Photo Roll.
    // The first time you do this, the app asks for access to your pictures.
    UIImageWriteToSavedPhotosAlbum(signatureImage, nil, nil, nil)
    
    // Since the Signature is now saved to the Photo Roll, the View can be cleared anyway.
    self.drawSignatureView.clearSignature()
  }
  

}



import UIKit

class ViewController: UIViewController, YPDrawSignatureViewDelegate {

  // Connect this Outlet to the Signature View
  @IBOutlet weak var drawSignatureView: YPDrawSignatureView!
