It is possible to create a Text
from multiple Text
instances, which is useful when you want to combine multiple fonts or formatting variations. The example below combines the font with size .largeTitle
with .callout
, one of the smallest font variations.
You may not be aware that it’s possible to add an Image
to a Text
by using String
interpolation, so I’ve done that here with the SF symbol for a pencil. Finally I have a formatted number and date, separated by a line break \n
. This was originally a space, but I found that the .multilineTextAlignment
modifier did not seem to apply to Text
created this way, even when applied to a Group
that encloses the entire thing.
In other words, you will need to insert your own line breaks if you want to use multiple lines when concatenating multiple Text
.