         }
     }
     
-    func prepareForAnimation(ignoreDimensions: Bool, newConstraintsClosure: (() -> ())) {
+    func prepareForAnimation(_ ignoreDimensions: Bool, newConstraintsClosure: (() -> ())) {
         //This ensures that the constraints are set http://corsarus.com/2015/auto-layout-and-constraints-animation/
         UIView.animate(withDuration: 0.0, animations: { () -> Void in
             self.superview?.layoutIfNeeded()

    }
    
    public func animateView(_ timeInterval: TimeInterval, delay: TimeInterval = 0.0, options: UIViewAnimationOptions = [], damping: CGFloat, springVelocity: CGFloat, ignoreDimensions: Bool = true, newConstraintsClosure: (() -> ()), completion: @escaping (() -> ()) = {}) {
        self.prepareForAnimation(ignoreDimensions: ignoreDimensions, newConstraintsClosure: newConstraintsClosure)
        
        UIView.animate(withDuration: timeInterval, delay: delay, usingSpringWithDamping: damping, initialSpringVelocity: springVelocity, options: options, animations: {[weak self] () -> Void in
            self?.superview?.layoutIfNeeded()

        return isValid
    }
    
    public func addDimensions(_ width: CGFloat? = nil, height: CGFloat? = nil, widthRelation: NSLayoutRelation = .equal, heightRelation: NSLayoutRelation = .equal) {
        if let w : CGFloat = width {
            let constraints: [NSLayoutConstraint] = [
                NSLayoutConstraint(item: self, attribute: NSLayoutAttribute.width, relatedBy: widthRelation, toItem: nil, attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1.0, constant: w),
