Instance Method

minimumScaleFactor(_:)

Sets the minimum amount that text scales down to fit the available space.

Declaration

func minimumScaleFactor(_ factor: CGFloat) -> some View

Parameters

factor

A fraction between 0 and 1 (inclusive) you use to specify the minimum amount of text scaling that this view permits.

Return Value

A view that limits the amount of text downscaling.

Discussion

Use the minimumScaleFactor(_:) modifier if the text you place in a view doesn’t fit and it’s okay if the text shrinks to accommodate. For example, a label with a minimumScaleFactor of 0.5 draws its text in a font size as small as half of the actual font if needed.