Created
June 19, 2020 15:30
-
-
Save gahntpo/2ae8ba1071a706a03298b39cf06d4b2b to your computer and use it in GitHub Desktop.
using absolute values to set the size of a view
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
Text("no frame - this is a long line that won't fit parent's size.") | |
.border(Color.green) | |
Text("with absolute frame - this is a long line that only has a width of 200 avaliable.") | |
.frame(width: 200, height: 100) | |
.border(Color.green) | |
Text("with fixedSize - this is a long line that won't fit parent's size.") | |
.fixedSize() | |
.border(Color.blue) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment