Questions tagged [swiftui-sheet]

38 questions
0
votes
1 answer

SwiftUI Form: Sheet isn't dismissed automatically when the view it's attached to is gone

See the code below (BTW, List has the same issue): enum Value: String, Equatable { case a = "a" case b = "b" } struct ContentView: View { @State var value: Value = .a @State var showSheet = false var body: some View { …
rayx
  • 1,329
  • 10
  • 23
0
votes
2 answers

SwiftUI: Make sheet show content header or complete content

I'd like to have a SwiftUI sheet that either shows the header or complete content. Requiring iOS 16 is ok. I already get the correct two measured heights a presentationDetents import Foundation import SwiftUI struct ContentView: View { @State…
Gerd Castan
  • 6,275
  • 3
  • 44
  • 89
0
votes
1 answer

SwiftUI present sheet in a TabItem of TabView using presentationDetents

I am trying to create the same experience where a sheet is presented in one of the tab items of a TabView - not covering the tabs. I am using .presentationDetents() and SwiftUI4.0 for that. See example of Apple's own app doing that The sheet is…
Y.H.
  • 1
  • 2
0
votes
1 answer

SwiftUI - Sheet doesn't work in Navigation View

Having issues with a NavigationView and Sheet. I want to use not full-size sheet but bottom sheet and connect LoginView() and SignView() through sheet. At this time, frame of SignView never follow sheet. So I tried two ways to solve. First,…
0
votes
0 answers

Bottom Sheet hide the toolbar bottom icons

I would like to know if there is any way with the bottom sheet SWIFTUI to build an app layout like Image Below, where a bottom sheet is displayed behind of a toolbar. I want this Design I tried to achieved it but didn't. ISSUE[A bottom sheet is…
0
votes
2 answers

SwiftUI: Logout and switch screens from a popover

In my app, I have a View which is set to either a login View or a home TabView, depending on if the user is logged in. From the TabView, the user can go to a profile popover and logout. I want to switch back to the login View from this popover. I…
0
votes
1 answer

SwiftUI using ForEach and onTapGesture to update selected element causing crash

I have some code that I am using, the idea is that the user selects a card they like and a sheet is presented to show more information about that card. The problem is, if I don't have the Text(selectedCard?.name ?? "Not selected") line, it crashes.…
-2
votes
1 answer

Sheet from Lazyvgrid.. again

I know this has been asked before, but I just can't figure out why it isn't working for me. I'm pretty new to coding, so any help would be appreciated. Trying to have BookSheetView open as a sheet after selecting a cell in my lazyvgrid. struct…
Benjec83
  • 31
  • 6
1 2
3