add spring animation to list view
This commit is contained in:
@@ -188,9 +188,7 @@ struct HomeView: View {
|
||||
VStack {
|
||||
if ShowBasedOnVoteLogics.isMissingCurrentVote(onboardingData: onboardingData.savedOnboardingData) {
|
||||
AddMoodHeaderView(addItemHeaderClosure: { (mood, date) in
|
||||
withAnimation {
|
||||
viewModel.add(mood: mood, forDate: date, entryType: .header)
|
||||
}
|
||||
})
|
||||
.frame(height: headerHeight)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
@@ -251,7 +249,9 @@ struct HomeView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
}.background(
|
||||
}
|
||||
.animation(Animation.spring(response: 0.3, dampingFraction: 0.5, blendDuration: 1))
|
||||
.background(
|
||||
GeometryReader { proxy in
|
||||
let offset = proxy.frame(in: .named("scroll")).minY
|
||||
Color.clear.preference(key: ViewOffsetKey.self, value: offset)
|
||||
|
||||
Reference in New Issue
Block a user