Skip to content

Commit

Permalink
[#5] Improve animation
Browse files Browse the repository at this point in the history
  • Loading branch information
blyscuit committed Oct 19, 2022
1 parent a2efc91 commit dbd854c
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions iosApp/Survey/Sources/Presentation/Modules/Login/LoginView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct LoginView: View {
@State private var password: String = ""
@State private var animating = false

private let animationDuration: Double = 0.8
private let animationDuration: Double = 0.7

var body: some View {
ZStack {
Expand All @@ -25,14 +25,13 @@ struct LoginView: View {
.ignoresSafeArea()
.frame(maxWidth: .infinity, maxHeight: .infinity)

if animating {
Assets.backgroundBlur
.image
.resizable()
.aspectRatio(contentMode: .fill)
.ignoresSafeArea()
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
Assets.backgroundBlur
.image
.resizable()
.aspectRatio(contentMode: .fill)
.ignoresSafeArea()
.frame(maxWidth: .infinity, maxHeight: .infinity)
.opacity(animating ? 1.0 : 0.001)

VStack(
alignment: .center,
Expand Down

0 comments on commit dbd854c

Please sign in to comment.