title: Custom Font Sizing in Xcode 6 Size Classes not working properly with Custom Fonts
body: <p><strong>Xcode 6</strong> has a new feature where <em>fonts</em> and <em>font sizes</em> in <code>UILabel</code>, <code>UITextField</code>, and <code>UIButton</code> can be set automatically based on the size class of the current device configuration, right in the storyboard. For example, you can set a <code>UILabel</code> to use font size 12 on "any width, compact height" (such as on iPhones in landscape) configurations and size 18 on "regular width, regular height" configurations (such as on <strong>iPads</strong>). More information is available here:</p>
  
  <p><a href="https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/AutolayoutPG/Size-ClassSpecificLayout.html" rel="nofollow noreferrer">developer.apple.com/size_class</a></p>
  
  <p>This is a great feature in theory because it could make it unnecessary to programmatically set different fonts on UI features based on the device configuration. Right now, I have some conditional code that sets the fonts based on the device type, but obviously, that means I have to set the fonts programmatically everywhere throughout the app. So I was initially really excited about this feature, but I found that it has a severe problem of actual usage for me (perhaps a bug). Note that I am building against <strong>SDK 8</strong> and setting a minimum deployment target of <strong>iOS 8</strong>, so this has nothing to do with compatibility with old versions of iOS.</p>
  
  <p><strong>The problem is this:</strong>
  If I set different font sizes for different size classes and use the <strong>"System" font</strong> provided by <em>iOS</em>, everything works as expected, and the font sizes change based on the size class. If I use a custom font supplied by my application (yes, I have it set up correctly in my application bundle, as it works programmatically) and set the custom font to a <em>label</em> in an <strong>XCode 6 storyboard</strong>, that also works as expected. But when I try to use different sizes of the custom font for different size classes, in the storyboard, it suddenly doesn't work. The only difference in configuration is the font I've chosen (a custom one vs. the System font). Instead, all of the fonts show up on the <em>device and simulator</em> as the <em>default system font</em> at the <em>default size</em>, regardless of size class (and I verified via the debugger that it is substituting the system font for the actual one specified in the storyboard). So basically, the size class feature appears to be broken for custom fonts. Also, interestingly, the custom fonts actually display and adjust size properly in the XCode 6 "Preview" pane for the view controller: it stops working only when running on the actual iOS system (which makes me think that I'm configuring it correctly).</p>
  
  <p>I tried multiple different custom fonts, and it doesn't seem to work for any of them, but it always works if I use "System" instead.</p>
  
  <p>Anyway, has anyone else seen this problem in <strong>Xcode 6</strong>?</p>
  
  <p>Any ideas on whether this is a bug in iOS 8, Xcode, or something </p>
  
  <p>Am I doing wrong? </p>
  
  <p>The only workaround I've found, as I said, is to continue to programmatically set the fonts like I have been for about three versions of iOS because that does work. </p>
  
  <p>But I'd love to be able to use this feature if I could get it to work with custom fonts. Using the System font is not acceptable for our design.</p>
  
  <hr>
  
  <p><strong>ADDITIONAL INFO:</strong>
  As of Xcode 8.0, the bug is fixed.</p>