         self.maximumZoomScale = image.size.width / size.width
         self.imageView.bounds.size = size
         self.contentSize = size
+    }
+    
+    @objc private func handleDoubleTap() {
+        if self.zoomScale == 1 {
+            self.setZoomScale(max(1, self.maximumZoomScale / 3), animated: true)
+        } else {
+            self.setZoomScale(1, animated: true)
+        }
     }
     
     // MARK: - UIScrollViewDelegate

        self.backgroundColor = UIColor.clear
        self.delegate = self
        self.imageView.contentMode = .scaleAspectFill
        self.addSubview(self.imageView)
    }
    
    override func didMoveToSuperview() {

    override func layoutSubviews() {
        
        super.layoutSubviews()
                
        if self.imageView.image != nil && oldSize != self.bounds.size {
            
            self.updateImageView()
