     }
 
     private var currentContentView: UIView? {
-        //        if (_imageView) {
-        //            return _imageView
-        //        }
-        //        if (_livePhotoView) {
-        //            return _livePhotoView
-        //        }
-        //        if (self.videoPlayerView) {
-        //            return self.videoPlayerView
-        //        }
+        if let imageView = imageView {
+            return imageView
+        }
+        if let livePhotoView = livePhotoView {
+            return livePhotoView
+        }
+        if let videoPlayerView = videoPlayerView {
+            return videoPlayerView
+        }
         return nil
     }
 }

        let gesturePoint =  gestureRecognizer.location(in: gestureRecognizer.view)
        delegate?.doubleTouch(in: self, location: gesturePoint)
        
        if enabledZoomImageView {
            // 如果图片被压缩了，则第一次放大到原图大小，第二次放大到最大倍数
            if scrollView.zoomScale >= scrollView.maximumZoomScale {
                setZoomScale(scrollView.minimumZoomScale, animated: true)
            } else {
                var newZoomScale: CGFloat = 0
                if scrollView.zoomScale < 1 {
                    // 如果目前显示的大小比原图小，则放大到原图
                    newZoomScale = 1
                } else {
                    // 如果当前显示原图，则放大到最大的大小
                    newZoomScale = scrollView.maximumZoomScale
                }
                
                var zoomRect = CGRect.zero
                let tapPoint = currentContentView?.convert(gesturePoint, to: gestureRecognizer.view) ?? .zero
                zoomRect.size.width = bounds.width / newZoomScale
                zoomRect.size.height = bounds.height / newZoomScale
                zoomRect.origin.x = tapPoint.x - zoomRect.width / 2
                zoomRect.origin.y = tapPoint.y - zoomRect.height / 2
                zoom(to: zoomRect, animated: true)
            }
        }
    }
    

    public weak var image: UIImage? {
        didSet {
            // 释放以节省资源
            livePhotoView?.removeFromSuperview()
            livePhotoView = nil
            destroyVideoRelatedObjectsIfNeeded()
            
