adding spring effect nicer and works both ways, getting nav bar up and out

This commit is contained in:
talksik
2021-12-17 04:13:02 -08:00
parent caf023ee48
commit ccd2f4d7ce
@@ -100,11 +100,7 @@ struct InnerCircleView: View {
// .stroke(Color.black) // .stroke(Color.black)
// .edgesIgnoringSafeArea(.all) // .edgesIgnoringSafeArea(.all)
if self.selectedUserIndex != nil { footerNavigation
footerNavigation
.transition(AnyTransition.move(edge: Edge.bottom))
.animation(Animation.default)
}
} }
.onAppear() { .onAppear() {
self.animateWaves = true self.animateWaves = true
@@ -133,6 +129,7 @@ struct InnerCircleView: View {
.padding(5) .padding(5)
} }
VStack (alignment: .leading) { VStack (alignment: .leading) {
Text("Sarth Shah") Text("Sarth Shah")
.font(.footnote) .font(.footnote)
@@ -153,6 +150,11 @@ struct InnerCircleView: View {
FooterControlsView() FooterControlsView()
} }
.padding() .padding()
.offset(
x:0,
y:self.selectedUserIndex == nil ? 150 : 0
)
.animation(Animation.spring(), value: self.selectedUserIndex)
} }
var bubbleNavigation : some View { var bubbleNavigation : some View {