Label not displaying when app is run on 3.1.3
In an app I have released I decided to support devices back to the original iPhone as long as they were running 3.1.3. The app was originally iPhone only but I subsequently updated it to Universal. I am having one problem that has cropped up after I converted the app to Universal and added code to check for UI_USER_INTERFACE_IDIOM and load alternate xibs based on the device detected. The problem: I have a label that I display in a table cell which is now not displaying only on 3.1.3 devices. After doing some digging as to why this label is not appearing I noticed that I specified Futura Medium as the font for this label (in a custom cell xib) and that this font is not present in 3.1.3. (Refer to this.). All other labels using Helvetica display fine in 3.1.3.
I am puzzled as to why this label appeared before I added the IDIOM code, but I am not seeing anything in my conditional code that would stop this label from 开发者_C百科displaying in any case. So I am tending to think that it has something to do with the font not being on that OS version.
If I had easy access to a 3.1.3 device or the 3.1.3 simulator was available in Xcode 4 I could test to see if this is in fact the problem, by choosing a different font and rebuilding the app. But I don't have easy access to such a device.
My question is: if I have assigned a font to a label and that font isn't built-in to an iOS version, would the 3.1.3 OS (or any other version of iOS for that matter) do a font substitution and display the label in an alternate font. or would it simply not display as I am now have seen on 3.1.3 devices? If such substitution does take place then my issue must lie elsewhere. If it just doesn't display if it can't find the font, then my issue is pretty well identified and I'll rebuild with a different font in the app and update in the store.
Per advice I got by posting the question to the Apple Developer Forum: "If a font is substituted, the resulting font might be too large for the control size and the whole text could be getting clipped. Would recommend logging the frame of the label and experimenting with a larger size."
精彩评论