iPhone: how to change label font-size by autosizing it for iPad app?
I want to convert an iPhone app into an iPad app
For that I am autosizing the controls, for button it works fine.
Problem comes when I am Autosizimg the label the position of label changes relativ开发者_JAVA技巧ely but the font size of label remains same.
How to increase the label size (i.e. font size of label) by Autosizing label ?
Please Help & Suggest
Thanks.
One option would be to chose a very large default font size, and set
label.adjustsFontSizeToFitWidth = YES;
This will work for a single-line label. For multiline, you will need to do more.
I have dynamically added the check for whether the device is iPhone or iPad and set the font size of label text according to the current device
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) //Code for iPad else //Code for iPhone or iPod
精彩评论