Created
June 19, 2020 15:14
-
-
Save gahntpo/2ec7f4253049cb5d8e89bb4ba8e5ec04 to your computer and use it in GitHub Desktop.
showing ZStack with default alignment behav
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
ZStack(alignment: .center) { | |
Text("first item") | |
.frame(width: 150, height: 100) | |
.background(Color.orange) | |
Text("second item") | |
.frame(width: 120, height: 70) | |
.background(Color.red) | |
Text("third item") | |
.frame(width: 80, height: 40) | |
.background(Color.gray) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment