                                height: view.bounds.size.height - Constants.margin * 2)
         view.addSubview(content)
 
-        let views: [UIView] = [imageViewAspectFill, imageViewAspectFit, imageViewFill]
+        let views: [UIView] = allImages.map { $0.view }
         let count = CGFloat(views.count)
         let height = (content.frame.height - Constants.spacing * (count - 1)) / count
 

import H19MediaViewer

class ViewController: UIViewController {
    lazy var imageViewAspectFill: UIImageView = {
        let view = UIImageView(image: UIImage(named: "vampeta")!)
        view.contentMode = .scaleAspectFill
        return view
    }()

    lazy var imageViewAspectFit: UIImageView = {
        let view = UIImageView(image: UIImage(named: "vampeta")!)
        view.contentMode = .scaleAspectFit
        return view
    }()

    lazy var imageViewFill: UIImageView = {
        let view = UIImageView(image: UIImage(named: "vampeta")!)
        view.contentMode = .scaleToFill
        return view
    }()

    private struct Constants {
        static let margin: CGFloat = 20
        static let spacing: CGFloat = 16
    }


        }
    }

    @objc private func didTapImage(sender: UITapGestureRecognizer) {
        guard let imageView = sender.view as? UIImageView,
              let media = allImages.first(where: { $0.view == imageView })
            else { return }

        var allModels: [MediaViewerImageModel]?

        if imageView == imageViewMultiple.view {
            allModels = allImages.map { $0.model }
        }

        let viewer = MediaViewer(image: media.model, allImages: allModels, delegate: nil)
        viewer.tintColor = .blue
        viewer.present()
    }
