I'm working on a location-based app and when the user taps a marker, the app should present a detail view as a sheet containing images. If the user clicks on an image I want to show that image in a full-screen view like Twitter.
I'm using SwiftUI, not UIKit.
DetailView.swift
WebImage(url: URL(string: location.logo))
.resizable()
.indicator(.activity)
.animation(.easeInOut(duration: 0.5))
.transition(.fade)
.scaledToFit()
.frame(width: 150, height: 150, alignment: .center)
.onTapGesture {
self.isOpened.toggle()
}
.sheet(isPresented: $isOpened) {
Text("Test")
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity)
.background(Color.red)
.edgesIgnoringSafeArea(.all)
}
As you can understand I wanna show this view which has a red background as a full screen.