Here's a super simple example:
struct ContentView: View {
var body: some View {
ZStack {
Text("Hello World")
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
.overlay {
Rectangle()
.stroke(Color.blue, lineWidth: 16)
.ignoresSafeArea(edges: [.bottom])
}
}
}
which results in:
The desire was to have an even stroke go along with the lower radius of the device, where now the corners are cut off.
I'm not even wanting it animated, just a border. Think the screen sharing border on most video conferencing apps. The Freeform app has something similar when using certain features in SharePlay, but it has a bottom toolbar so that solves the lower radius issue.
Topic:
UI Frameworks
SubTopic:
General
Tags: