title: How to modify the view's CALayer
body: <p>I see the code in <a href="https://github.com/mturner1721/MTAnimatedLabel" rel="nofollow">MTAnimatedLabel</a></p>
  
  <pre><code> CAGradientLayer *gradientLayer  = (CAGradientLayer *)self.layer;
  gradientLayer.backgroundColor   = [super.textColor CGColor];
  gradientLayer.startPoint        = CGPointMake(-self.gradientWidth, 0.);
  gradientLayer.endPoint          = CGPointMake(0., 0.);
  gradientLayer.colors            = [NSArray arrayWithObjects:(id)[self.textColor CGColor],(id)[self.tint CGColor], (id)[self.textColor CGColor], nil];
  </code></pre>
  
  <p><strong>self</strong> is an UILabel. From the document, the layer should be readonly but I don't know why in this repo, it works.</p>
  
  <p>So I try these code in my program.</p>
  
  <pre><code> UIView *gradientView = [[UIView alloc] initWithFrame:textLayer.frame];
  [self.view addSubview:gradientView];
  CAGradientLayer *gradient = (CAGradientLayer*)gradientView.layer;
  gradient.startPoint = CGPointMake(-0.4, 0.0);
  gradient.endPoint = CGPointMake(0.0, 0.0);
  gradient.colors = @[(id)[UIColor darkGrayColor].CGColor, (id)[UIColor whiteColor].CGColor, (id)[UIColor darkGrayColor].CGColor];
  gradient.backgroundColor = [UIColor clearColor].CGColor;
  gradient.frame = textLayer.frame
  </code></pre>
  
  <p>It throw an error: 
  <strong>-[CALayer setColors:]: unrecognized selector sent to instance 0x8f8dca0</strong></p>
  
  <p>I can't understand why my code is no able to run. Hope anyone can help me.</p>