SheeKit
SheeKit copied to clipboard
Feature: Ability to change background color
Hey @edudnyk Great package. I'm loving it.
One small thing, is it possible to enable us to have our own background color? The only way to achieve this is by doing:
.shee(isPresented: $isShowingSheet,
presentationStyle: .formSheet(properties: .init(detents: [ .medium(), .large() ], selectedDetentIdentifier: $selectedDetentIdentifier, animatesSelectedDetentIdentifierChange: true)),
presentedViewControllerParameters: presentedViewControllerParameters,
onDismiss: didDismiss) {
VStack {
Text("License Agreement")
.font(.title)
.padding(50)
Text("""
Terms and conditions go here.
""")
.padding(50)
Button("Dismiss",
action: { isShowingSheet.toggle() })
}
}
// Background color
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color.gray.edgesIgnoringSafeArea(.all))
Hey @SylarRuby, what exactly prevents you from having your own background color, and where? Why you modify the background to the output of .shee(...)
and not the VStack
itself?
.shee(isPresented: $isShowingSheet,
presentationStyle: .formSheet(properties: .init(detents: [ .medium(), .large() ], selectedDetentIdentifier: $selectedDetentIdentifier, animatesSelectedDetentIdentifierChange: true)),
presentedViewControllerParameters: presentedViewControllerParameters,
onDismiss: didDismiss) {
VStack {
Text("License Agreement")
.font(.title)
.padding(50)
Text("""
Terms and conditions go here.
""")
.padding(50)
Button("Dismiss",
action: { isShowingSheet.toggle() })
}
.background(Color.gray.edgesIgnoringSafeArea(.all))
}