From c5d1fb7eb0dea59517e9d4aabae81d2e06a9292e Mon Sep 17 00:00:00 2001 From: song-cool Date: Fri, 9 Sep 2022 02:47:25 +0900 Subject: [PATCH] [FEAT] Change Flip Animation more Naturally --- AsyncSwift/Views/StampView.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/AsyncSwift/Views/StampView.swift b/AsyncSwift/Views/StampView.swift index f056ec8..f14a8c1 100644 --- a/AsyncSwift/Views/StampView.swift +++ b/AsyncSwift/Views/StampView.swift @@ -30,24 +30,25 @@ struct StampView: View { notScannedView } } - .padding(36) - .navigationTitle("Stamp") + .padding(36) + .navigationTitle("Stamp") } } // body } // View private extension StampView { + @ViewBuilder var stampBack: some View { Image("Seminar002StampBack") - .shadow(color: Color(.sRGB, red: 0, green: 0, blue: 0, opacity: 0.2), radius: 20, x: 0, y: 4) //TODO: 디자인 수정 사항이 있습니다. + .shadow(color: Color(.sRGB, red: 0, green: 0, blue: 0, opacity: 0.2), radius: 20 , x: 40 * frontDegree / 90, y: 4) .rotation3DEffect(Angle(degrees: frontDegree), axis: (x: 0, y: 1, z: 0)) } @ViewBuilder var stampFront: some View { Image("Seminar002StampFront") - .shadow(color: Color(.sRGB, red: 0, green: 0, blue: 0, opacity: 0.2), radius: 20, x: 0, y: 4) //TODO: 디자인 수정 사항이 있습니다. + .shadow(color: Color(.sRGB, red: 0, green: 0, blue: 0, opacity: 0.2), radius: 20, x: 40 * backDegree / 90, y: 4) .rotation3DEffect(Angle(degrees: backDegree), axis: (x: 0, y: 1, z: 0)) }