在ios 6.0版上不推荐使用最小字体大小 [英] Minimum Font Size deprecated on ios version 6.0

查看:131
本文介绍了在ios 6.0版上不推荐使用最小字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚使用iOS 6.0升级到xcode 4.5,它突出显示了我的XIB文件中所有UILabel的警告ios版本6.0上不推荐使用的最小字体大小。有谁知道这是指什么以及如何解决它?

I just upgraded to xcode 4.5 with iOS 6.0 and it's highlighting a warning on all the UILabels in my XIB files saying "minimum font size deprecated on ios version 6.0". Does anyone know what this is referring to and how to fix it?

更新:
图片不再可用(当时 https://skitch.com/hahmadi82/eyk51/cloud

推荐答案

minimumFontSize UILabel 的属性。

minimumFontSize 的替代方案是 minimumScaleFactor 。如果将 minimumFontSize / defaultFontSize 分配给 minimumScaleFactor ,则其工作方式与minimumFontSize相同。

An Alternative to the minimumFontSize is minimumScaleFactor. If you assign minimumFontSize/defaultFontSize to minimumScaleFactor, it works in the same way as minimumFontSize.

代码如下 - 例如字体大小为30.0,如果你想最小字体大小为12.0

The Code is as follows - For Example the font size is 30.0 and if you want the minimum font size to be 12.0

YOURLABEL.font= [UIFont fontWithName:@"FONT_NAME" size:30.0];
[YOURLABEL setMinimumScaleFactor:12.0/[UIFont labelFontSize]];

这篇关于在ios 6.0版上不推荐使用最小字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆