         let constraints = [
             progressView.heightAnchor.constraint(equalToConstant: 40.0),
             progressView.widthAnchor.constraint(equalToConstant: 40.0),
-            progressView.centerXAnchor.constraint(lessThanOrEqualTo: self.centerXAnchor, constant: 1.0),
-            progressView.centerYAnchor.constraint(lessThanOrEqualTo: self.centerYAnchor, constant: 1.0),
+            progressView.centerXAnchor.constraint(lessThanOrEqualTo: centerXAnchor, constant: 1.0),
+            progressView.centerYAnchor.constraint(lessThanOrEqualTo: centerYAnchor, constant: 1.0),
             ].map { $0.isActive = true }
      }
     

extension ImageView {

    func didDoubleTap(_ sender: UIGestureRecognizer) {
        if self.scrollView.zoomScale == 1.0 {
            let touchPoint = sender.location(in: self)
            scrollView.zoom(to: CGRect(x: touchPoint.x, y: touchPoint.y, width: 1, height: 1), animated: true)
        } else {

        
        scrollView.translatesAutoresizingMaskIntoConstraints = false
        let constraints = [
            scrollView.topAnchor.constraint(equalTo: topAnchor, constant: 0.0),
            scrollView.bottomAnchor.constraint(equalTo: bottomAnchor, constant: 0.0),
            scrollView.rightAnchor.constraint(equalTo: rightAnchor, constant: 0.0),
            scrollView.leftAnchor.constraint(equalTo: leftAnchor, constant: 0.0),
            ].map { $0.isActive = true }
    }
    
