Last active
August 12, 2020 20:54
-
-
Save pMalvasio/12952b393bdb6e207104d3d7448e8ba4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var body: some View { | |
ZStack { | |
Color.black.opacity(0.8) | |
.edgesIgnoringSafeArea(.all) | |
.blur(radius: 200) | |
ZStack { | |
Color.gray.opacity(0.5) | |
Circle() | |
.trim(from: 0.2, to: 1) | |
.stroke( | |
Color.white, | |
style: StrokeStyle( | |
lineWidth: 5, | |
lineCap: .round | |
) | |
) | |
.frame(width: width, height: height) | |
.shadow(color: Color.black.opacity(0.1), radius: 3, x: 0, y: 3) | |
.rotationEffect(.degrees(isAnimating ? 360 : 0)) | |
.animation( | |
Animation.linear(duration: 1) | |
.repeatForever(autoreverses: false) | |
) | |
} | |
.frame(width: 80, height: 80) | |
.background(Color.white) | |
.cornerRadius(30) | |
.shadow(color: Color.white.opacity(0.3), radius: 5, x: 0, y: 5) | |
.shadow(color: Color.black.opacity(0.1), radius: 2, x: 0, y: 2) | |
.onAppear { | |
self.isAnimating = true | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment