     
     private lazy var blurredView: UIVisualEffectView = {
         let v = UIVisualEffectView(effect: UIBlurEffect(style: .dark))
+        return v
+    }()
+    
+    private lazy var closeBtn: UIButton = {
+        var v: UIButton
+        if #available(iOS 13.0, *) {
+            v = UIButton(type: .close)
+        } else {
+            v = UIButton(type: .roundedRect)
+            v.setTitle("X", for: .normal)
+            v.tintColor = .white
+            v.borderWidth = 1
+            v.borderColor = .white
+            v.cornerRadius = 15
+        }
+        v.addTarget(self, action: #selector(closeBtnTouch(_:)), for: .touchUpInside)
         return v
     }()
     

//MARK:
extension ImageViewerViewController: UIGestureRecognizerDelegate {
    public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
        if (gestureRecognizer is UIPanGestureRecognizer || gestureRecognizer is UIRotationGestureRecognizer) {
            return true
        } else {
            return false
        }
    }
}


                    if #available(iOS 13.0, *) {
                        self.imageView.transform = CGAffineTransform(translationX: 0, y: UIScreen.main.bounds.height)
                    } else {
                        self.imageView.layer.frame.origin = CGPoint(x: self.view.frame.origin.x, y: self.imageView.frame.size.height)
                    }
                }) { (isCompleted) in
                    if isCompleted {
