   @objc required dynamic init?(coder aDecoder: NSCoder) {
     fatalError("init(coder:) has not been implemented")
   }
+    
+  func dismiss(){
+    self.dismiss(animated: true, completion: nil)
+  }
 }
 
 struct ImageInfo: Identifiable {


  required init() {
    super.init(rootView: ImagesTableView())
    
    rootView.onTapRow = { image in
      
      let destinationViewController = UIHostingController(rootView: ImageViewWrapper(name: image.name, heroID: image.name)


@available(iOS 13.0, *)
struct ImagesTableView: View {
  var dismiss: (() -> Void)?
  var onTapRow: ((ImageInfo)->())?
    
  @State var images = (0...9).map{ ImageInfo(id: $0, name: "Unsplash\($0)") }
    
  var body: some View {
    VStack {
      HStack{
        Button(action: {
            self.dismiss?()
        }) {
          Text("Back")
        }.padding(.leading)
        Spacer()
      }
      
      List(images) { image in
        HStack {
          ImageViewWrapper(name: "\(image.name)_cell", heroID: image.name)
          Spacer()
          Text("Image number \(image.id)").padding()
        }.onTapGesture {
          self.onTapRow?(image)
        }
      }
    }
  }
