title: Misplaced CAGradientLayer on iPhone 6s
body: <p>I have a few <code>UILabels</code> with colored background and I added <code>CAGradientLayers</code> to them like below.</p>
  
  <pre><code>CAGradientLayer * gradientLayer = [CAGradientLayer layer];
  gradientLayer.colors = [NSArray arrayWithObjects:
                          (id) [UIColor colorWithWhite:1 alpha:0.3].CGColor,
                          (id) [UIColor colorWithWhite:0.5 alpha:0.3].CGColor, nil];
  gradientLayer.frame = label.bounds;
  gradientLayer.cornerRadius = label.layer.cornerRadius;
  [label.layer insertSublayer:gradientLayer atIndex:0];
  </code></pre>
  
  <p>On iPhone 4 and iPhone 5s it looks perfect, but on iPhone 6s the <code>CAGradientLayers</code> are misplaced horizontally like the following screenshot.</p>
  
  <p><a href="https://i.stack.imgur.com/k9W1h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k9W1h.png" alt="enter image description here"></a></p>
  
  <p>This problem happens for UIButtons as well.</p>
  
  <p>I am running iOS 9.3. </p>