Closed AndrewSB closed 3 months ago
Have you tried setting the largestUndimmedDetentIdentifier
?
extension PresentationLinkTransition.SheetTransitionOptions.Detent.Identifier {
static let partial = PresentationLinkTransition.SheetTransitionOptions.Detent.Identifier("small")
}
extension PresentationLinkTransition.SheetTransitionOptions.Detent {
static let partial = PresentationLinkTransition.SheetTransitionOptions.Detent.custom(.partial) { ctx in
return ctx.maximumDetentValue * 2 / 3
}
}
struct ContentView: View {
var body: some View {
PresentationLink(
transition: .sheet(
options: .init(
detents: [.partial],
largestUndimmedDetentIdentifier: .partial
)
)
) {
Text("Content")
} label: {
Text("Label")
}
}
}
ahh no! i missed that, thank you for your work, i'll give it a shot
awesome, that works!
hey! swiftui has a modifier on their sheet content,
.presentationBackgroundInteraction
, that allows touches to be handled by the background, not the sheet content, is there a way to replicate that?my sheet only takes up the bottom 3rd of the screen, so i'd like the top 2/3rds of the screen to still be interactive, not have touches taken by the black overlay area of my sheet