title: UILabel appearance font and attributed string font
body: <p>In my app I have a global custom font applied to all labels like so:</p>
  
  <pre><code>UIFont *font = [UIFont fontWithName:kMyFontName size:15.0]; 
  [[UILabel appearance] setFont:font];
  </code></pre>
  
  <p>This works fine.  However, in some cases I want to be able to specify a different font for a specific region of a UILabel string.</p>
  
  <p>So I have something like this:</p>
  
  <pre><code>NSString *string = @"Foo Bar Baz";
  UIFont *boldFont = [UIFont fontWithName:kMyBoldFontName size:15.0]; 
  NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:string];
  [attrString setAttributes:@{ NSFontAttributeName: boldFont } range:NSMakeRange(0, 3)];
  self.myLabel.attributedText = attrString;
  </code></pre>
  
  <p>However this doesn't seem to work.  I expect the "Foo" to be bold, but the entire string just has the default font. It's as if the bold font is not applied at all and is being overwritten by the font set on the UILabel appearance proxy.</p>
  
  <p>When I remove the UILabel appearance line then it works fine (I can see part of the string in bold).  Basically I want to have my custom font applied to the label but a separate font applied to a different region of the string. Normally this works fine with attributed strings but for some reason setting the UILabel appearance font disables this functionality (or so it seems).</p>
  
  <ul>
  <li>Expected results: "<strong>Foo</strong> Bar Baz"</li>
  <li>Actual results: "Foo Bar Baz"</li>
  </ul>
  
  <p>If I remove the <code>[[UILabel appearance] setFont:]</code> line then it works:</p>
  
  <ul>
  <li>"<strong>Foo</strong> Bar Baz"</li>
  </ul>
  
  <p>(but the custom font is not set on the rest of the string).</p>
  
  <p>So my question is: Is there a way to specify a single font to use as the default app-wide but still be able to partially override that using attributed strings?</p>
  
  <p>Also if someone can explain to me why this is not working I'd appreciate it.</p>