Guest User

Untitled

a guest
Jun 21st, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. override func layoutSubviews() {
  2. sizeToFit()
  3. var sizeThatFits: CGSize = bounds.size
  4. sizeThatFits.width = UIScreen.main.bounds.size.width - popupSizeHorizontalMargin
  5. sizeThatFits.height = getStartedButton.frame.maxY + popupBottomMargin
  6. let newFrame = CGRect(x: popupOriginX, y: bounds.midY - sizeThatFits.height/2, width: sizeThatFits.width, height: sizeThatFits.height)
  7. frame = newFrame
  8. }
Add Comment
Please, Sign In to add comment