             zoom(to: zoomToRect, animated: true)
         }
     }
+    
+    func orientationDidChanged(notify: Notification) {
+        refreshFrame()
+    }
 }
 
 // MARK: - UIScrollViewDelegate

            tap.require(toFail: doubleTap)
        }
        
        _addViews()
        _configViews()
        layoutViews()
    }
    
    func layoutViews() {
    }
    
    func _refreshImageViewenter() {
        let offsetX = bounds.width > contentSize.width ? (bounds.width - contentSize.width) * 0.5 : 0
        let offsetY = bounds.height > contentSize.height ? (bounds.height - contentSize.height) * 0.5 : 0
        imageView.center = CGPoint(x: contentSize.width * 0.5 + offsetX, y: contentSize.height * 0.5 + offsetY)

    }
    
    func scrollViewDidZoom(_ scrollView: UIScrollView) {
        refreshImageViewCenter()
    }
    
    func scrollViewDidEndZooming(_ scrollView: UIScrollView, with view: UIView?, atScale scale: CGFloat) {
        refreshImageViewCenter()
    }
}
