Enables dynamic type support and automatic size adjustments by default, but configurable on initialisation.
This changes the behaviour of the .responsiveTextFieldFont() modifier - even though this uses the environment internally, we cannot keep setting the font in updateUIView otherwise it will override any content-size adjusted font that has been set internally by the text field.
With this change, the text field will only update based on changes to the font set in the environment using responsiveTextFieldFont if adjustsFontForContentSizeCategory is set to false - setting this to false means the caller is responsible for adjusting the font size dynamically.
Enables dynamic type support and automatic size adjustments by default, but configurable on initialisation.
This changes the behaviour of the
.responsiveTextFieldFont()
modifier - even though this uses the environment internally, we cannot keep setting the font inupdateUIView
otherwise it will override any content-size adjusted font that has been set internally by the text field.With this change, the text field will only update based on changes to the font set in the environment using
responsiveTextFieldFont
ifadjustsFontForContentSizeCategory
is set tofalse
- setting this to false means the caller is responsible for adjusting the font size dynamically.