func allowsTightening (Bool) -> some View
func truncationMode (Text.TruncationMode ) -> some View
func flipsForRightToLeftLayoutDirection (Bool) -> some View
Availability 有効性
Technology
A view that limits the amount of text downscaling. テキストを縮小する量を制限したあるビュー。
factor
A fraction between 0 and 1 (inclusive) you use to specify the minimum amount of text scaling that this view permits. 0と1(を含めて)の間の小数、このビューが許可するテキスト拡大縮小の最小限の量を指定するためにあなたが使用するもの。
Use the minimum
modifier if the text you place in a view doesn’t fit and it’s okay if the text shrinks to accommodate.
minimum
修飾子を使ってください、もしあなたがビューの中に置くテキストがぴったり合わないそしてテキストが縮んで適合するなら問題ないならば。
For example, a label with a minimum scale factor of 0
draws its text in a font size as small as half of the actual font if needed.
In the example below, the HStack
contains a Text
label with a line limit of 1
, that is next to a Text
. To allow the label to fit into the available space, the minimum
modifier shrinks the text as needed to fit into the available space.
HStack {
Text("This is a long label that will be scaled to fit:")
.lineLimit(1)
.minimumScaleFactor(0.5)
TextField("My Long Text Field", text: $myTextField)
}
func allowsTightening (Bool) -> some View
func truncationMode (Text.TruncationMode ) -> some View
func flipsForRightToLeftLayoutDirection (Bool) -> some View