title: How to make Custom UILabel in ios
body: <p>In my project there is huge number of <code>UIlabel</code>s. I have created one separate custom class for <code>UILabel</code> and I have set all label's properties in that class.</p>
  
  <p>Here my main requirement is some labels' color is white and some labels' text color is black but color is not applying.</p>
  
  <h2>CustomUILabel class:-</h2>
  
  <pre><code>#import "CustomLabel.h"
  
  @implementation CustomLabel
  
  -(void)layoutSubviews{
  
      [self setupUI];
  }
  
  - (void)setupUI {
  
      [self setTextAlignment:NSTextAlignmentLeft];
      [self setFont:[UIFont fontWithName:@"Futura" size:14.0]];
      [self setBackgroundColor:[UIColor clearColor]];
      [self setTextColor:[UIColor blackColor]];
  }
  
  @end
  </code></pre>
  
  <h2>Main class:-</h2>
  
  <pre><code>#import "MainViewController.h"
  
  @interface MainViewController (){
  
  }
  
  @end
  
  @implementation MainViewController
  @synthesize label1,label2;
  
  
  - (void)viewDidLoad {
      [super viewDidLoad];
  
       label1.textColor = [UIColor whiteColor];
       label2.textColor = [UIColor blackColor];
  }
  </code></pre>