lukeredpath / swift-responsive-textfield

A SwiftUI wrapper around UITextField with binding-based state and responder control
Apache License 2.0
86 stars 13 forks source link

Attempt to setting adjustsFontForContentSizeCategory as view modifier #8

Closed peteralt closed 3 years ago

peteralt commented 3 years ago

This is a (so far failed) attempt to set the adjustsFontForContentSizeCategory of the TextField as a view modifier. I'm not sure what I'm missing, but the TextField does not respond to any font size changes.

When I force-call didUpdateTraits every time the UI updates, the font size appears to be changing somewhat, but that clearly can't be the correct way of achieving this and it doesn't appear to be the proper size either.

Maybe this PR is helpful along the way, but please feel free to close this if it isn't.

lukeredpath commented 3 years ago

Thanks for this @peteralt - this is a good start. Closed in favour of #9.