From 582ed3237d3019e2d825411a26c4ad95f28637bc Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 24 Dec 2025 14:53:28 -0600 Subject: [PATCH] Signed-off-by: Matt Bruce --- Blackjack/Blackjack/Views/Table/DealerHandView.swift | 9 +++++++++ Blackjack/Blackjack/Views/Table/PlayerHandView.swift | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/Blackjack/Blackjack/Views/Table/DealerHandView.swift b/Blackjack/Blackjack/Views/Table/DealerHandView.swift index a302c89..501c80a 100644 --- a/Blackjack/Blackjack/Views/Table/DealerHandView.swift +++ b/Blackjack/Blackjack/Views/Table/DealerHandView.swift @@ -61,6 +61,14 @@ struct DealerHandView: View { } } .zIndex(Double(index)) + .transition( + .asymmetric( + insertion: .move(edge: .top) + .combined(with: .opacity) + .combined(with: .scale(scale: Design.Scale.slightShrink)), + removal: .scale.combined(with: .opacity) + ) + ) } // Show placeholder for second card in European mode (no hole card) @@ -70,6 +78,7 @@ struct DealerHandView: View { } } } + .animation(.spring(duration: Design.Animation.springDuration, bounce: Design.Animation.springBounce), value: hand.cards.count) .overlay(alignment: .bottom) { // Result badge - overlayed so it doesn't add height to the view if let result = hand.cards.count >= 2 && showHoleCard ? handResultText : nil { diff --git a/Blackjack/Blackjack/Views/Table/PlayerHandView.swift b/Blackjack/Blackjack/Views/Table/PlayerHandView.swift index 79bfc33..946c7ae 100644 --- a/Blackjack/Blackjack/Views/Table/PlayerHandView.swift +++ b/Blackjack/Blackjack/Views/Table/PlayerHandView.swift @@ -131,9 +131,18 @@ struct PlayerHandView: View { } } .zIndex(Double(index)) + .transition( + .asymmetric( + insertion: .move(edge: .top) + .combined(with: .opacity) + .combined(with: .scale(scale: Design.Scale.slightShrink)), + removal: .scale.combined(with: .opacity) + ) + ) } } } + .animation(.spring(duration: Design.Animation.springDuration, bounce: Design.Animation.springBounce), value: hand.cards.count) .padding(.horizontal, Design.Spacing.medium) .padding(.vertical, Design.Spacing.medium) .background(