0

I have a horizontal stackview filled equally with 3 labels. These labels have set adjustsFontSizeToFitWidth and minimumScaleFactor values set. 2 labels will have short texts and one may have large text. Now the large title label's font is reduced automatically and I want the other two labels to automatically update their font size to match the last label font size. Is it possible?

Label1 text - "a"

Label2 text - "b"

Label3 text - "Something long"

Now Label3's font looks smaller than Label1 and Label2.

iOSDev
  • 199
  • 11
  • Have you tried self.view.layoutifneeded? – Vasilis D. Jan 17 '20 at 12:36
  • 1
    You would have to do this manually by somehow finding the scale of the labels using something like this... https://stackoverflow.com/questions/31416163/uilabel-get-current-scale-factor-when-minimumscalefactor-was-set and then calculating the minimum scale between the labels and updating the others accordingly. Or something – Fogmeister Jan 17 '20 at 12:48

0 Answers0