简体   繁体   English

iPhone 4S和iPhone 3GS中的UILabel

[英]UILabel in iPhone 4S versus iPhone 3GS

I have been testing my app on the Simulator and an iPhone 3GS, and have most of the kinks worked out (I think!). 我已经在模拟器和iPhone 3GS上测试了我的应用程序,并且解决了大多数问题(我认为!)。 I recently got to try it on an iPhone 4S, and there are some strange display issues with UILabel . 我最近不得不在iPhone 4S上进行尝试,并且UILabel出现了一些奇怪的显示问题。 These are generic UILabel , with System 17 font in all cases. 这些都是通用的UILabel ,在所有情况下均带有System 17字体。 I have used a storyboard to insert the UILabel . 我已经使用情节提要插入UILabel I'm running iOS6 on the iPhone 4, and iOS6.0.1 on the iPhone 3. On the iPhone 4, the text is truncated, and "..." is added. 我在iPhone 4上运行iOS6,在iPhone 3上运行iOS6.0.1。在iPhone 4上,文本被截断,并添加了“ ...”。 Anyone know why? 有人知道为什么吗? And how to fix this? 以及如何解决这个问题?

Here's what it looks like on the the Simulator (looks the same on the iPhone 3): 这是模拟器上的外观(在iPhone 3上看起来相同):
(source: WhatDidILike.com ) (来源: WhatDidILike.com
.

Here's what it looks like on the iPhone 4: 这是iPhone 4上的样子:
(source: WhatDidILike.com ) (来源: WhatDidILike.com
.

I wonder if this is the new AutoLayout feature fighting against you? 我想知道这是否是新的AutoLayout功能与您抗衡吗?

In any event, make your UILabel's wider in your storyboard, and/or add a "Minimum Font Size" autoshrink attribute for the text in the UILabel attribute inspector (which looks like this): 无论如何,使您的UILabel在情节提要中更宽 ,和/或在UILabel属性检查器中为文本添加“最小字体大小”自动收缩属性(如下所示):

最小字号

Appears to be a new thing with iOS 6... 似乎是iOS 6的新事物...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM