Created
June 19, 2020 15:43
-
-
Save gahntpo/03adf8ad0e15c78ac370b921e8f62414 to your computer and use it in GitHub Desktop.
specifying the alignment position inside the frame
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
HStack { | |
Text("alignment: \n .leading") | |
.background(Color.orange) | |
.frame(width: 110, height: 100, alignment: .leading) | |
.border(Color.red) | |
Text("alignment: \n .center") | |
.background(Color.orange) | |
.frame(width: 110, height: 100, alignment: .center) | |
.border(Color.red) | |
Text("alignment: \n .trailing") | |
.background(Color.orange) | |
.frame(width: 110, height: 100, alignment: .trailing) | |
.border(Color.red) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment