Reputation: 2213
In my application I want to change all the UILabel, UITextField etc font size based on the OS font size/type. In iOS7 we can change the font size from device Settings.
So if the OS font size is changed to small, then I need to change all the text in my applications to little smaller, similar case for the other font type also (Large, Extra large).
Any suggestions as to how I can change the font size w.r.t OS font type? Thanks a lot!
Upvotes: 1
Views: 1227
Reputation: 3273
You should set fonts all the UILabel, UITextField like below
yourLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
you can use whatever the TextStyle you want. so the text size will be w.r.t OS font size
Upvotes: 1