The logic I want to use is below, just not sure the exact code to pull this info in order to execute. I think I only need to figure out how to get the label height.
let labelHeight = ???
let screenHeight = self.view.bounds.height
let yPosition = ((screenHeight-labelHeight) / 2 ) - ~20
UIView.animate(withDuration: 3, animations: {
self.movingButton.center.y -= yPosition
}
A main question also is how do I pull the height of a specific label, if there are multiple on the screen.
Thanks!
Figured it out after much trial and error!
I expect this to place the label 30 pixels below the top of the screen on any device.