title: programmatically set UILabel font to User Defined Runtime Attribute
body: <p>I have an <code>UIViewController</code> in which I create an <code>UILabel</code> programmatically in its' <code>viewDidLoad:</code> like so:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      UILabel  *navTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(17, 0, 100, 100)];
  
      navTitleLabel.backgroundColor = [UIColor clearColor];
      navTitleLabel.textAlignment = NSTextAlignmentCenter;
      navTitleLabel.textColor=[UIColor colorWithHexString:@"#000029"];
  
      [navTitleLabel setFont:[UIFont fontWithName:@"Pennyscript" size:20]];
  
      self.navigationItem.titleView = navTitleLabel;
  }
  </code></pre>
  
  <p>I have the "User defined Runtime Attribute" set in the <code>ViewController's</code> identity inspector tab:</p>
  
  <p><a href="https://imgur.com/s8NauVU" rel="nofollow noreferrer"><img src="https://i.imgur.com/s8NauVU.png" title="Hosted by imgur.com" /></a></p>
  
  <p>What I'm trying to do here is programmatically set the <code>UILabel</code> <strong>navTitleLabel</strong>'s font to my custom font, then add that <code>UILabel</code> into the <code>navigationBar's</code> <code>titleView</code>. What am I doing wrong? How can I accomplish this goal?</p>
  
  <p>With the UDKA(<em>User defined key attribute</em>) in the VC ID-inspector, the app crashes with this stack trace message:</p>
  
  <p><em>Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key fontName.'</em></p>
  
  <p>When I remove my <em>User Defined Key Attribute</em> from the ViewController, I can then navigate to the VC with no crash.</p>