I’m going through a bizarre concern. I’ve the next code which shows a medium dimension sheet (half display screen). The case for inputLocation and chooseARide works nice and the views/screens are displayed in medium sheet.
For some purpose .locateDriver at all times shows in a full display screen. I’m not certain what’s the purpose.
.sheet(merchandise: $activeSheet, content material: { sheet in
Group {
change sheet {
case .inputLocation:
VStack {
locationInputView
PlaceListView(locations: locations) { place in
change activeField {
case .pickup:
print(place.handle)
journey.pickup = place.handle
case .vacation spot:
print(place.handle)
journey.vacation spot = place.handle
activeSheet = .chooseARide
default:
break
}
}
}
case .chooseARide:
ChooseARideScreen(journey: journey) {
activeSheet = .locateDriver
}
case .locateDriver:
LocateDriverScreen()
}
}
.presentationDetents([.medium, .large])
.presentationBackgroundInteraction(
.enabled(upThrough: .medium)
)
.interactiveDismissDisabled()
})
ChooseARideScreen has a button which fires a onRideSelected closure.
Button(motion: {
onRideSelected()
}
This closure will ultimately be fired once I carry out some async operation however for now I’ve eliminated the async activity.
Any concepts why LocateDriverScreen is at all times displayed as a full display screen and never in a medium sheet.