Shadow of RoundedRectangle is pixelated on edges

120 views Asked by At

Based on some logic we apply shadow for RoundedRectangle which is the element used in the .background property of the whole VStack.

VStack { 
  ...
}
.background(
RoundedRectangle(cornerRadius: 16, style: .continuous)
                    .foregroundColor(.white)
                    .shadow(color: .black,
                            radius: .zero,
                            x: 4,
                            y: 4)
)

The pixelated parts appear on the bottom left and right edges as well as the top right corner.

I did try using different kinds of RoundedRectangle styles (both of them .circular & continuous), but nothing really helped.

Thanks in advance.

0

There are 0 answers