         // A weird bug that frames are not update right after orientation changed. Need delay a little bit with async.
         DispatchQueue.main.async {
             self.configureImageForSize(self.imageSize)
+            self.imageScrollViewDelegate?.imageScrollViewDidChangeOrientation(imageScrollView: self)
         }
     }
 }


import UIKit

open class ImageScrollView: UIScrollView {
    
    @objc public enum ScaleMode: Int {

    
    @objc public private(set) var zoomView: UIImageView? = nil
    
    @objc open weak var imageScrollViewDelegate: ImageScrollViewDelegate?

    var imageSize: CGSize = CGSize.zero
    private var pointToCenterAfterResize: CGPoint = CGPoint.zero
