title: Frame width is not the full screen width
body: <p>I'm adding a gradient to a view and it's <a href="https://i.stack.imgur.com/UMuNb.png" rel="nofollow noreferrer">cutting off the width</a> on one side.</p>
  
  <p>My code for adding the gradient is</p>
  
  <pre><code>let gradientLayer = CAGradientLayer()
  gradientLayer.frame = fadeView.frame
  gradientLayer.colors = [UIColor.mainColor().cgColor, UIColor.white.cgColor]
  
  fadeView.layer.addSublayer(gradientLayer)
  </code></pre>
  
  <p>The <code>fadeView</code> is inside of a vertical <code>stackView</code>, inside of a <code>view</code> inside of a <code>scrollView</code>, all of which have horizontal constraints on the left and right of 0, not constraining to margins.</p>
  
  <p>The frame width for the <code>fadeView</code> (and all other views other than the main view) is 320, but that might just be because of the device I'm testing on. The width of the screen is actually 375.</p>
  
  <p>What's causing it to cut off like this?</p>