I am trying to add a rounded rectangle to my list items in a zstack. It all seems to work great, until I rotate my iPhone, then the list either disappears and another view shows up or the list rotates but uses only half the screen in landscape and displays another view behind it that has not even been called up yet.
Here is the the code I’m trying to use. If I remove this, the list goes back to just plain white and works perfect.
RoundedRectangle(cornerRadius: 10)
.fill(LinearGradient(gradient: Gradient(colors: [Color.gray, Color.orange]), startPoint: .topLeading, endPoint: .bottomTrailing))
.clipShape(RoundedRectangle(cornerRadius: 10))
//.padding(.horizontal, 4)
.shadow(color: Color("ButtonShadows"), radius: 3, x: 3, y: 3)
Below is screenshot of it in landscape.