Simple problem, I want a view that consists of a rounded rectangle with a red border and a clear fill. Here is some simple code. For sake of seeing the problem easier, I have removed the fill (and it appears the default fill is black).
import SwiftUI
struct ContentView: View {
var body: some View {
RoundedRectangle(cornerRadius: 30)
.frame(width: 100, height: 100)
.border(Color.red, width: 4)
}
}
#if DEBUG
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
#endif
Run this code, you'll see a black filled rounded rectangle bounded by a red border. However, the border is not rounded, it is a simple rectangle.
Is this a bug, or am I missing something?