         }
     }
     
+    private class func interfaceKitImageNamed(_ name: String, compatibleWithTraitCollection: UITraitCollection? = nil) -> UIImage? {
+        if #available(iOS 13.0, *) {
+            return UIImage(systemName: name, compatibleWith: compatibleWithTraitCollection)
+        } else {
+            let bundle = Bundle.interfaceKitBundle()
+            return UIImage(named: name, in: bundle, compatibleWith: compatibleWithTraitCollection)
+        }
+    }
+
     private func modifiedImage( draw: (CGContext, CGRect) -> ()) -> UIImage {
         
         // using scale correctly preserves retina images

        case checkmark = "checkmark"
    }
    
    class func templateImage(_ template: Template) -> UIImage {
        return UIImage.interfaceKitImageNamed(template.rawValue)!
    }
    
    private class func interfaceKitImageNamed(_ name: String, compatibleWithTraitCollection: UITraitCollection? = nil) -> UIImage? {
        if #available(iOS 13.0, *) {
            return UIImage(systemName: name, compatibleWith: compatibleWithTraitCollection)
        } else {
            let bundle = Bundle.interfaceKitBundle()
            return UIImage(named: name, in: bundle, compatibleWith: compatibleWithTraitCollection)
        }
    }


    /**
     Generates an UIImage from a CAGradientLayer

        return image!
    }

    /**
     Redraws the `UIImage` to the given size. Use this method
     to redraw big PDF based images to smaller sizes and force
     a smaller `intrinsicContentSize` to the host `UIImageView`
     
     - parameter newSize: The new size of the image
     
     - returns: The resized UIImage
     */
    func scaleTo(_ newSize: CGSize) -> UIImage {
        UIGraphicsBeginImageContextWithOptions(newSize, false, 0.0)
        self.draw(in: CGRect(x: 0, y: 0, width: newSize.width, height: newSize.height))
        let newImage: UIImage? = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        return newImage ?? self
    }

    @available(iOS, deprecated: 13.0, obsoleted: 14.0, message: "This will be removed in iOS 14; please migrate to a different API.")
    func tint(_ tintColor: UIColor) -> UIImage {
        return modifiedImage { context, rect in
            context.setBlendMode(.multiply)
