Swift and SwiftUI tutorials for Swift Developers

What is the .minimumScaleFactor modifier for?

In SwiftUI you can use the .minimumScaleFactor modifier to automatically downscale text.

For example:

.minimumScaleFactor(0.5)

SwiftUI will automatically scale down the text to fit the available space. The value sets the minimum amount of scaling that the view permits. In this case, SwiftUI can draw the text in a font size as small as 50% of the original font size.

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Article

How to add vertical and horizontal ScrollView in SwiftUI

Next Article

How to create a button in SwiftUI

Related Posts