         }
     }
     
-    @IBInspectable public var strokeColor: UIColor = UIColor.blackColor() {
+    @IBInspectable public var strokeColor: UIColor = UIColor.black() {
         didSet {
             self.strokeColor.setStroke()
         }
     }
     
-    @IBInspectable public var signatureBackgroundColor: UIColor = UIColor.whiteColor() {
+    @IBInspectable public var signatureBackgroundColor: UIColor = UIColor.white() {
         didSet {
             self.backgroundColor = signatureBackgroundColor
         }
     }
     
     // Computed Property returns true if the view actually contains a signature
-    public var containsSignature: Bool {
+    public var doesContainSignature: Bool {
         get {
-            if self.path.empty {
+            if self.path.isEmpty {
                 return false
             } else {
                 return true

    }
    
    // Save the Signature (cropped of outside white space) as a UIImage
    public func getSignatureCropped(scale scale:CGFloat = 1) -> UIImage? {
        guard let fullRender = getSignature(scale:scale) else { return nil }
        let bounds = scaleRect(path.bounds.insetBy(dx: -strokeWidth/2, dy: -strokeWidth/2), byFactor: scale)
        guard let imageRef = CGImageCreateWithImageInRect(fullRender.CGImage, bounds) else { return nil }
        return UIImage(CGImage: imageRef)
    }
    
    func scaleRect(rect: CGRect, byFactor factor: CGFloat) -> CGRect
    {
        var scaledRect = rect
        scaledRect.origin.x *= factor

// YPDrawSignatureView is open source
// Version 0.2.0
//
// Copyright (c) 2014 - 2016 Yuppielabel and the project contributors
// Available under the MIT license
