title: Create a Class for Reused UILabels
body: <p>I find myself creating essentially the same UILabel repeatedly in my app. So I'm thinking this is a good time to create a class for it and just call the class?</p>
  
  <p>For example, I reuse this code many times to create a UILabel for my UINavigationBar in views, with the only difference being the label.text that I'm thinking I can pass as a parameter:</p>
  
  <pre><code>// - - - - - Add a Navigation Bar
  
  UINavigationBar *navBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
  navBar.barStyle = UIBarStyleBlack; 
  navBar.translucent = YES;
  
  [self.view addSubview:navBar];
  [navBar release];
  
  // - - - - - Add a label to the navbar
  
  UILabel *navLabel = [[UILabel alloc] initWithFrame:CGRectMake(20,8,280,30)];
  navLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
  navLabel.text = @"Some Label String";
  navLabel.backgroundColor = [UIColor clearColor];
  navLabel.textColor = [UIColor whiteColor];
  navLabel.font = [UIFont boldSystemFontOfSize:20];
  navLabel.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.5];
  navLabel.textAlignment = UITextAlignmentCenter;
  [navBar addSubview:navLabel];
  [navLabel release];
  </code></pre>
  
  <p>So I'm thinking I should be able to create a UILabelNavBar Class and simply create the UILabel by calling it like this:</p>
  
  <pre><code>navBar addSubview:[UILabelNavBar createLabel:@"Some Label String"]];
  </code></pre>
  
  <p>Except I don't know how to create the class. 
  Any help is appreciated.
  lq</p>