(Cross post from: Stack Overflow)
Is it possible to create a SwiftUI preview of a presented sheet without running the Live Preview? For example:
The above results in the following preview:
(See image 1 on Stack Overflow)
In order for the sheet content to be presented in the preview, you must run the Live Preview:
(See image 2 on Stack Overflow)
Is it possible to create a SwiftUI preview of a presented sheet without running the Live Preview? For example:
Code Block struct Sheet_Previews: PreviewProvider { static var previews: some View { Text("Background").sheet(isPresented: .constant(true)) { Text("Sheet") } } }
The above results in the following preview:
(See image 1 on Stack Overflow)
In order for the sheet content to be presented in the preview, you must run the Live Preview:
(See image 2 on Stack Overflow)