A quick one, for some reason my app looks different on MacOs and IOS. I am using the same code base in Swift for both. So when build on Mac transparency looks bad ? Any suggestions ?
import SwiftUI
struct ImageOverlay: View {
var body: some View {
VStack(alignment: .leading) {
Text("")
.foregroundColor(.primary)
.font(.title)
.fontWeight(.semibold)
.frame(width: 200, height: 200)
.background(.ultraThinMaterial)
.cornerRadius(24)
.shadow(color: Color(.sRGBLinear, white: 0, opacity: 0.20), radius: 5)
}
}
}
struct ContentView: View {
var body: some View {
VStack {
Image("BackgroundImage")
.resizable()
.scaledToFill()
.overlay(ImageOverlay())
}
}
}