IPhone - getting adjusted font size of UITextField

I have a UITextField with the adjustsFontSizeToFitWidth property set to YES. I want to get the current (adjusted) font size. Is it possible?

If not, getting the actual width of the text (in the adjusted size) will be almost as good.

+3
source share
3 answers

At the adjusted size, the width of the text will be the same as the width of the text box.

+1
source

I do not think this is possible, but it should not be too difficult to write your own class.

+1
source

Source: https://habr.com/ru/post/1755370/


All Articles