4

I think that is the best wording of this (at least for the size class in question). I have a UILabel inside of a container view inside of my view controller in a UIStoryboard. It appears that when I add multiple constraints to a UILabel so as to change the font size between size classes, the runtime result is not my font but what appears to just be the default. As seen on iPhone 6 simulator and iPhone 6 Plus device.

Before: Interface Builder (multiple constraints set):

Interface Builder

At Runtime:

Runtime multiple constraints

By removing the second constraint as seen in the first picture, the result is now:

Runtime single constraint

Things I have verified:

  • Fonts are in Copy Bundle Resources build phase
  • Fonts provided by application Info.plist key is complete, correct

The interface builder generated XML appears correct. So I'm not sure what is happening here. Considering filing a bug report unless I am missing something obvious.

Stefan Arambasich
  • 2,231
  • 2
  • 19
  • 24
  • It certainly sounds like a bug, and here's one more test to try: do it all again but with a built-in font. If this feature works then, you've really got it pinned down exactly as you've described: multiple font-per-size-class settings, and a custom font. — Oh, sorry, one more thing to try before filing the bug: do exactly the same thing again but this time on Xcode 7 / iOS 9. It may be that this is fixed there. – matt Jul 04 '15 at 19:09
  • It appears to be okay with a built in font. I still have to to the Xcode 7 migration. Seems like a lot of work for something you can't submit from :/ – Stefan Arambasich Jul 04 '15 at 19:17
  • If you were using Swift you wouldn't say that. Swift 2.0 is a Huge Leap Forward. :) Anyway, I don't see what's "a lot of work" about it; it's just a download. (A really big download.) And nothing stops you from keeping Xcode 6.4 and continuing to use it; I am using both Xcode 6.3.2 and Xcode 7 beta 2 with no difficulty at all. – matt Jul 04 '15 at 19:34
  • I am using Swift, but I have been through two large projects already and the toolchain is awful so far. So unless that and speed is addressed in 2, I'm not overly optimistic. A lot of work is having to migrate from 1.2 to 2 when you can't use beta software to submit to the App Store. Understandably the code will need to be upgraded at some point but now is not that time, if I want to submit, which requires Xcode 6 and 1.2 syntax. – Stefan Arambasich Jul 05 '15 at 03:16
  • All I'm saying is that it would be nice to know whether the bug is fixed in iOS 7. But you've got great material for a bug report as it is, so please do submit it. This size-class/font thing is new and they need to get it right. – matt Jul 05 '15 at 03:24
  • As soon as I get through the migration we will find out! – Stefan Arambasich Jul 05 '15 at 15:31
  • Let me know if you need any help. I think by now I know all the tricks for turning Swift 1.2 code into legal Swift 2.0 code! – matt Jul 05 '15 at 15:37
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/82417/discussion-between-stefan-arambasich-and-matt). – Stefan Arambasich Jul 05 '15 at 16:53

0 Answers0