I have a simple view with a VStack made of two Rectangles. I have a binding on openView. That binding, a bool, is changed and the body of the view is called and the two Rectangles fade away. They do not transition each in the direction I intend.
What is wrong with this code?
What is wrong with this code?
Code Block struct OpeningView: View { @Binding var openView: Bool var body: some View { VStack { if openView == false { Rectangle() .edgesIgnoringSafeArea(.all) .foregroundColor(Color.red) .transition(.move(edge: .top)) Rectangle() .edgesIgnoringSafeArea(.all) .foregroundColor(Color.blue) .padding(.top, -8) .transition(.move(edge: .bottom)) } } } }