Skip to content

Instantly share code, notes, and snippets.

@stevencurtis
Last active April 19, 2021 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevencurtis/5ff796b0fc43d5577e63f6c8236e43d5 to your computer and use it in GitHub Desktop.
Save stevencurtis/5ff796b0fc43d5577e63f6c8236e43d5 to your computer and use it in GitHub Desktop.
layoutSubviews
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
button.frame = CGRect(x: (self.view.frame.width / 2) - (self.button.frame.width / 2), y: self.view.frame.height - 100, width: button.frame.width, height: button.frame.height )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment