to keep it short - I'm trying to achieve this look:
It's a RoundedRectangle with the following settings:
My problem is that I can't put .blendMode(.overlay) after setting the shadow color without Xcode yelling at me the compiler is unable to type-check the expression in reasonable time or that it failed to produce diagnostic for the expression.
How would you solve this?
Code:
RoundedRectangle(cornerRadius: 20, style: .continuous)
.fill(
Color(red: 0.098, green: 0.110, blue: 0.114)
.shadow(.inner(
color: .white,
radius: 2,
x: -2,
y: -2)
)
.shadow(.inner(
// color: .black.blendMode(.overlay), this crashes the code
color: .black,
radius: 4,
x: 2,
y: 2))
)
.frame(width: 40, height: 11)