     }
     
     public func scrollViewDidZoom(_ scrollView: UIScrollView) {
-        self._adjustContentPosition()
-        self.delegate?.zoomed(to: scrollView.zoomScale, in: self)
+        self._didZoom(in: scrollView)
+    }
+    
+    public func scrollViewDidEndZooming(_ scrollView: UIScrollView, with view: UIView?, atScale scale: CGFloat) {
+        self._didZoom(in: scrollView)
     }
 }
 


// MARK: Adjust Content Position / Update Zoom Scales
private extension ZoomView {
    func _updateZoomScalesAndAdjustContentPosition() {
        self._updateZoomScales()
        self._adjustContentPosition()
    }
    
    func _adjustContentPosition() {
        guard self.centerHorizontally || self.centerVertically else {
            return
        }
        
        let scrollView: UIScrollView = self._scrollView
        let contentView: UIView = self._contentView
        
        var adjustHorizontalPosition: () -> Void = {}
        if self.centerHorizontally {
            adjustHorizontalPosition =
            (contentView.width < scrollView.width) ?
                contentView.centerHInSuperview :
                { contentView.left = 0 }
        }
        
        var adjustVerticalPosition: () -> Void = {}
        if self.centerVertically {
            adjustVerticalPosition =
            (contentView.height < scrollView.height) ?
                contentView.centerVInSuperview :
                { contentView.top = 0 }
        }
        
        UIView.animate(
            withDuration: 0.3,
            delay: 0,
            usingSpringWithDamping: 1,
            initialSpringVelocity: 0.6,
            options: [.allowUserInteraction],
            animations: {
                adjustHorizontalPosition()
                adjustVerticalPosition()
            },
            completion: { _ in }
        )
    }

    func _updateZoomScales() {

        set(newFrame) {
            super.frame = newFrame
            self._scrollView.size = newFrame.size
            self._updateZoomScalesAndAdjustScrollViewContentInsets()
        }
    }
    
