title: Stackview different depending on device it runs on swift
body: <p>I have 4 buttons in a stackview.  The buttons have no kind of constraints.  The stackview is pinned to the left, right, and bottom.  No warnings for more constraints needed.  The problem is when I run it on 5 it looks fine but on any larger device it is not right.  I have the following code working with these buttons.</p>
  <p>This makes the white lines</p>
  <pre><code>extension CGRect {
      init(_ x:CGFloat, _ y:CGFloat, _ w:CGFloat, _ h:CGFloat) {
          self.init(x:x, y:y, width:w, height:h)
      }
  }
  
  extension UIView {
      func addTopBorderWithColor(color: UIColor, width: CGFloat) {
          let border = CALayer()
          border.backgroundColor = color.cgColor
          border.frame = CGRect(0, 0, self.frame.size.width, width)
          self.layer.addSublayer(border)
      }
  }
  </code></pre>
  <p>And then I have my awake from nib to draw them.</p>
  <pre><code>class DigitButtomFrame: UIButton {
      override func awakeFromNib() {
          addTopBorderWithColor(color: .white, width: 1.0)
      }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/H10d4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H10d4.png" alt="iPhone 5" /></a>
  <a href="https://i.stack.imgur.com/ZnYNH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZnYNH.png" alt="iPhone 7s" /></a></p>