Skip to content

Commit 00456a4

Browse files
committed
ui: animate button from right
1 parent c907573 commit 00456a4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

BDKSwiftExampleWallet/View/OnboardingView.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ struct OnboardingView: View {
4040
.tint(.secondary)
4141
.font(.title)
4242
.opacity(animateContent ? 1 : 0)
43-
.animation(.easeOut(duration: 0.5).delay(1.2), value: animateContent)
43+
.offset(x: animateContent ? 0 : 100)
44+
.animation(.spring(response: 0.6, dampingFraction: 0.7).delay(1.2), value: animateContent)
4445

4546
Button {
4647
if let clipboardContent = UIPasteboard.general.string {
@@ -53,7 +54,8 @@ struct OnboardingView: View {
5354
.tint(.secondary)
5455
.font(.title)
5556
.opacity(animateContent ? 1 : 0)
56-
.animation(.easeOut(duration: 0.5).delay(1.2), value: animateContent)
57+
.offset(x: animateContent ? 0 : 100)
58+
.animation(.spring(response: 0.6, dampingFraction: 0.7).delay(1.3), value: animateContent)
5759
} else {
5860
Button {
5961
viewModel.words = ""

0 commit comments

Comments
 (0)