title: Set UIView frame equal to the frame of another view from a different superview
body: <p>I'm creating UIViews that are in different superviews, but I want to set the frames to be equal to each-other.</p>
  <p><a href="https://i.stack.imgur.com/h73us.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h73us.png" alt="enter image description here" /></a></p>
  <p>This is what I've tried so far</p>
  <pre><code>let globalPoint = self.view.convert(subViewOfOuterView.frame.origin, to: nil)
  let frame = CGRect(x: globalPoint.x, y: globalPoint.y, width: self.subViewOfOuterView.frame.width, height: self.subViewOfOuterView.frame.height)
  subViewOfInnerUIView.frame = frame
  </code></pre>
  <p>But my view ends up looking like this</p>
  <p><a href="https://i.stack.imgur.com/mUk1P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mUk1P.png" alt="enter image description here" /></a></p>