I have a problem with changing the font size in UILabel dynamically. In my application, I have two tags.
- The first label size is 90 * 59
- The second tag size is 59 * 59
Now the problem is that the font size of the first shortcut may change at runtime. I have to change the font size of the second label to fit the font size of the first label.
I used the following method, but it does not work.
CGFloat secondLabelsize = firstLabel.font.pointSize; [seconLabel setFont: [UIFont fontWithName: @"Exo-Light" size:secondLabelsize]]; viewDidLod { [hr_lbl setFont: [UIFont fontWithName: @"Exo-Light" size:55]]; }
Every time I have a shortcut size of only 55. Pls will prompt me to get the current font size (first shortcut) instead of the specific font size in viewdidload.
source share