Created
December 30, 2020 17:45
-
-
Save BetterProgramming/7df2e5f2c3685eb5454d2aa3cce26048 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
GeometryReader { geo in | |
ZStack { | |
VStack(spacing: 20) { | |
HStack { | |
Spacer() | |
Label( | |
title: { Text("A") }, | |
icon: { Image(systemName: "a.circle.fill") }).font(.system(size: 50)) | |
Spacer() | |
}.background(Color.green) | |
Image("image") | |
.resizable() | |
.scaledToFill() | |
.frame(width: 250, height: 400) | |
Spacer() | |
}.offset(x: self.currentSegment == 0 ? 0 : -geo.size.width, y: 0) | |
.animation(.default) | |
} | |
}.padding(.horizontal) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment