title: How to set gradient color to the background of UILabel in iPhone
body: <p>I am using the following code to set the gradient color to the background of label but no effect what i am doing wrong?
  Code is here:</p>
  
  <pre><code>    [self.teamName setTextColor:[UIColor whiteColor]];
      [self.teamName setBackgroundColor:[UIColor clearColor]];
      CAGradientLayer *gradientLayer = [CAGradientLayer layer];
      gradientLayer.frame = self.teamName.bounds;
      gradientLayer.colors = [NSArray arrayWithObjects:(id)[[UIColor whiteColor]CGColor], (id)[[UIColor blackColor]CGColor], nil];
      [self.teamName.layer insertSublayer:gradientLayer atIndex:0];
  </code></pre>